This project follows the Hexagonal Architecture (Ports and Adapters Pattern) using NestJS. Hexagonal Architecture ensures modularity, testability, and maintainability by separating business logic from infrastructure concerns.
npm installnpm run startnpm run build && npm run start:prodThis project includes a seeding feature to populate the database with initial data. Run the following command to seed the database:
npm run seedThis project includes TypeORM migration support for database schema changes.
- Generate a new migration:
npm run migration:generate
- Run pending migrations:
npm run migration:run
For more information about this project and basic Architecture explanation, visit the Medium Blog.
Environment variables are managed using .env files. Define required variables in .env or .env.example:
NODE_ENV=
APP_PORT=3005
DATABASE_TYPE=
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_SYNCHRONIZE=
AUTH_JWT_SECRET=
AUTH_JWT_TOKEN_EXPIRES_IN=
UPLOAD_LOCATION=upload/
BACKEND_URL=http://localhost:5000/
FRONTEND_URL=http://localhost:3000- NestJS - Modular and scalable Node.js framework
- TypeScript - Static typing for maintainability
- MySQL - Relational database support
- TypeORM - ORM for database management
npm run testThis project includes Swagger for API documentation. After running the server, visit:
http://localhost:3005/api/v1/api-docs#/
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Submit a Pull Request.
This project is licensed under the MIT License.