- Docker
- NodeJS (>=16)
Today we're going to build a Todo App.
Technical Requirements
- User is able to login to retrieve their todos.
- User can create/edit/delete todolist contains many todo tasks.
- It should be fast
Code Maintainability Check
- Absolute attention to code quality.
git
is utilized to stick to the strategy of atomic commits
The backend expose one route:
- '/api/auth/[...nextauth]' All requests made to this route will automatically be handled by NextAuth.js.
GET /api/auth/[...nextauth]
POST /api/auth/[...nextauth]
- Install deps:
npm install
- Copy .env.example file
cp .env.example .env
- Start the databases
npm run docker
- Run database migrations
npm run migrate
- Run tests
npm run test
- Make sure you have all the required enviroment variables
- Make sure you have Docker Desktop installed and running in your OS.
- Question ?
- Open to discussion
-
I used Drizzle ORM as my database ORM, if you want to modify the database schema,
- Edit schema.ts
- Then, generate a new migration,
npm run migrate
- This will also apply the migration
- Data Model
- CRUD Operation
-
To inspect the database:
- Instruction coming soon...