The system demonstrate role-base access, advanced pagination, clean and maintainable code, rate limiting, performance optimization, and importantly, a well-structured codebase.
- Role-based access with well-structured implementation.
- Secure authentication with JWT access and refresh token.
- Advanced pagination for getting a summary of records.
- Well-structured, consistent, and predictable APIs with best practices.
- Rate-limit implementation with easily maintainable, clean code.
- Easy to set up locally with Docker.
- Backend: Node.js, TypeScript, NestJS
- Database: PostgreSQL, Prisma ORM
- Rate-limit: Redis, rate-limiter-flexible
- Package Manager: pnpm
- Tool: Docker
To run the app with Docker, run:
docker compose upAlternative way of running the app:
-
Clone the repository
git clone https://github.com/mdarkanurl/finance-dashboard-system.git
-
Install dependencies
pnpm install --frozen-lockfile
-
Add an environment variable, create a
.envfile, and add the variable. Use.env.examplefor guidance. -
Setup database
npx prisma generate npx prisma db push
-
Run the app
pnpm run start:dev # development pnpm run build && pnpm run start # production
- Base URL:
/api/v1 - Authentication: JWT access token and refresh token stored in cookies
- Main endpoints:
/authfor signup, signin, refresh, and logout/usersfor admin user management/recordsfor record CRUD and pagination/dashboardfor summary, trends, recent transactions, and categories
All API responses follow a consistent format:
{
"success": true,
"message": "...",
"data": { ... },
"error": null
}{
"success": false,
"message": "...",
"data": null,
"error": { ... }
}Contributions, issues, and feature requests are welcome! If you want to contribute to this project, please follow the guidelines outlined in the contributing.md file.
This project is licensed under the MIT License - see the LICENSE file for details