- Setup your database locally with two options:
- PostGRES
- Install
postgres
locally and use the username/password inDATABASE_URL
provider in.env
, these should be used for connection:
host: localhost port: 5432 username: local password: password
- Launch the local PostGRES and use the provided
.env
- Install
- SQLite
- Swap out your
datasource
inschema.prisma
:
datasource db { provider = "sqlite" url = env("DATABASE_URL") }
- Update your
.env
to instead point to:
DATABASE_URL="file:./dev.db"
- Delete
./prisma/migrations
- Run
prisma migrate dev --name init
to initialize the local DB - this should create a./prisma/dev.db
if one doesn't exist - You can see the database by running
yarn prisma seed
- Swap out your
- PostGRES
- Run locally:
yarn dev
- ran into issues with types and generation artifacts from schema to
zod
validation resolvers - the graph has a simple interface that could be improved with a more readable x-axis labeling
- the notes page could include more styling clean up to improve the negative space
- the
Layout
component added more white space than originally intended. Didn't bother to dig into this for now. - configuring the Heroku Postgres instance was an extra step that required additional testing. Next time, I'd start with setting that up.
- improve the loading states - they're pretty basic
- ended up skipping tests - could configure them to run when deployment
- add
husky
git hooks to prevent deployment of TypeErrors - add import aliases to clean up the import paths in files
- graph could look better on mobile (currently flattens)
- improve the UX of the timestamps (date/time formatting) - originally had issues with the chart library where it shifted the values if I modified the labels
- Enjoyed trying out some new technologies and organizing the code
- Made use of generics
- Converted the test data for graph into an API as well
- Setup a local Postgres instance for deployment