The 2020 Next.js rewrite, now being merged into impress!
Find a file
Matchu 753305dd11 Fix "Untitled outfit" on open outfit in new window
Previously, when you navigated directly to an outfit by typing the URL into the browser or following an external link, the name would stay as "Untitled outfit", even after the outfit loaded.

This was because, when you render an `Editable` Chakra component with `value={undefined}`, it permanently enters "uncontrolled" mode, and providing a value later doesn't change that.

But tbh passing `undefined` down from outfit state wasn't my intention! But yeah, turns out the `?.` operator returns `undefined` rather than `null`, which I guess makes sense!

So, I've fixed this on both ends. I'm now passing more `null`s down via outfit state, because I think that's a more expected value in general.

But also, for the `Editable`, I'm making a point of passing in an empty string as `value`, so that this component will be resilient to upstream changes in the future. (It's pretty brittle to _depend_ on the difference between `null` and `undefined`, as we saw here 😅)
2021-01-17 08:19:47 -08:00
.github/workflows Fix GitHub Action for Sentry, attempt 6 2021-01-16 11:27:26 -08:00
.vscode update chakra imports 2020-12-25 09:08:33 -08:00
api basic outfits page with pet-only thumbnails 2021-01-04 08:10:35 +00:00
public add analytics code 2020-12-07 17:28:01 -08:00
scripts only sync recent users to auth0 2021-01-16 11:08:12 -08:00
src Fix "Untitled outfit" on open outfit in new window 2021-01-17 08:19:47 -08:00
.gitignore upgrade to react-scripts 4.0.1 2020-12-28 13:47:09 -08:00
package.json Add Sentry error logging + privacy statement 2021-01-16 10:59:54 -08:00
README.md update README to mention Rails app is gone 2020-09-04 04:09:01 -07:00
yarn.lock Add Sentry error logging + privacy statement 2021-01-16 10:59:54 -08:00

Dress to Impress beach logo

Dress to Impress 2020

This is a rewrite of the Neopets customization app, Dress to Impress!

It's a React app, built with create-react-app, running on Vercel, JAMstack-style.

The motivating goals of the rewrite are:

  • Mobile friendly, to match Neopets's move to mobile.
  • Simple modern tech, to be more maintainable over time and decrease hosting costs.

If you want to contribute, please reach out to Matchu! This repository is almost shareable, but the main limitation is that we currently run even our development server against the production database, and those credentials are private. But we can change that if there's interest!

Architecture sketch

First, there's the core app, in this repository.

  • React app: Runs on Vercel's CDN. Code in src/app.
  • API functions: Run on Vercel's Serverless Functions. Code in api and src/server.

Then, there's our various data storage components.

  • MySQL database: Runs on our Linode VPS, colocated with the old app.
  • Amazon S3: Stores PNGs of pet/item appearance layers, converted from the Neopets SWFs. (Once Neopets releases HTML5-compatible assets for all their items, we can hopefully remove this!)

Finally, there's our third-party integrations.

  • Auth0: For authentication. Data imported from our old OpenNeo ID auth database.
  • Honeycomb: For observability & performance insights on the backend.
  • Discord: For logging Support users' actions to a private Discord server.
  • Neopets: We load pet data from them! And plenty of assets!

Notable old components not currently included in Impress 2020:

  • Elasticsearch: Used for lightning-fast item search queries. So far, we're finding the MySQL queries to be fast enough in practice. Might consider using some kind of fulltext query engine if that doesn't scale with more users!
  • Resque: Used to schedule background tasks for modeling and outfit thumbnails.
  • Outfit thumbnail generation: Used for outfit thumbnails in the app. I'm wondering if there's a way to get away with not doing this, like just rendering the layers... but I suppose if we want a good social share experience, then we'll probably want this. Maybe we can generate them on the fly as API requests, instead of adding a data storage component?
  • Memcache: Used to cache common HTML and JSON snippets. Not yet needing anything similar in Impress 2020!
  • The entire old Rails app! No references to it in here, aside from some temporary URL links to features that aren't implemented here yet.