- ToDo features:
- create a ToDo (only if user is an owner of given ToDo)
- delete a ToDo (only if user is an owner of given ToDo)
- update a ToDo (only if user is an owner of given ToDo)
- list all user's ToDo
- Auth features:
- create an account
- login to retrieve a JWT token
- reset password flow (with sending an email)
- connection of AuthUser with ToDoAuthor by events (i.e. creating the AuthUser causes creating a duplicate ToDoAuthor record in ToDo domain)
Missing:
- soft and hard delete of a user
- roles and groups for users
- ToDo author with profile image (uploading files)
CQRS
End-to-end tests
Hexagonal architecture
Migrations
TypeORM (with One-to-many relation)
Seeding (with Faker)
REST API
- Make sure you have a docker container with PSQL database installed
- Copy
.env-sample
and rename it to.env
- Fill
.env
with values:- database type:
postgres
- database port:
5432
- database username:
postgres
- database password:
docker
- jwt secret:
test
(or whatever you want) - jwt expires in:
36000
- database type:
- Start a PSQL container using
docker run --rm --name todo-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 postgres
- Run
npm install
- Run
npm run seed:run
- Run
npm start
- Application will be available under
localhost:3000
- Run
npm install
- Run
npm start
- Go to
http://localhost:3000/swagger
Assuming you have a docker container with database prepared (docker with PSQL database and seed has been run)
- Run
npm install
- Run
npm run test api-todo-e2e
This project was generated using Nx.
🔎 Smart, Extensible Build Framework
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
Below are our core plugins:
- React
npm install --save-dev @nrwl/react
- Web (no framework frontends)
npm install --save-dev @nrwl/web
- Angular
npm install --save-dev @nrwl/angular
- Nest
npm install --save-dev @nrwl/nest
- Express
npm install --save-dev @nrwl/express
- Node
npm install --save-dev @nrwl/node
There are also many community plugins you could add.
Run nx dep-graph
to see a diagram of the dependencies of your projects.
Visit the Nx Documentation to learn more.