Simple full-stack ToDo web app as a college project. Be aware this is not production-ready code. Use at your own discretion.
Consists of 2 APIs;
- REST API for authentication and JWT signing - /api/auth
- GraphQL API for actual user and todo data - /graphql - requires a valid JWT token
Consists of a single server-side route (API) for authentication and storing session. Rest happens on client-side.
- Apollo
- TypeScript
- Fastify
- NextAuth
- Passport
- Prisma
- TailwindCSS
Run
npm ci
in root directory.
Put your DB connection data inside packages/models/.env; A double postgres (db + shadow) combo was used during development; the schema is simple enough to work with any prisma-supported SQL DB.
npx nx run models:migrate-up
npx nx run models:gen-client
npx nx run todo-api:serve
By default will run on http://localhost:3333
npx nx run to-do-list:fetch-schema
npx nx run to-do-list:schema-codegen
npx nx run to-do-list:serve
Simply POST (e.g. with Postman) an application/json into /api/auth/register with body-params 'username' and 'password' to create a new user.