Skip to content

mdarkanurl/finance-dashboard-system

Repository files navigation

finance dashboard system

The system demonstrate role-base access, advanced pagination, clean and maintainable code, rate limiting, performance optimization, and importantly, a well-structured codebase.

Core features

  • 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.

Tech stack

  • Backend: Node.js, TypeScript, NestJS
  • Database: PostgreSQL, Prisma ORM
  • Rate-limit: Redis, rate-limiter-flexible
  • Package Manager: pnpm
  • Tool: Docker

Setup instructions

To run the app with Docker, run:

   docker compose up

Alternative way of running the app:

  1. Clone the repository

    git clone https://github.com/mdarkanurl/finance-dashboard-system.git
  2. Install dependencies

    pnpm install --frozen-lockfile
  3. Add an environment variable, create a .env file, and add the variable. Use .env.example for guidance.

  4. Setup database

    npx prisma generate
    npx prisma db push
  5. Run the app

    pnpm run start:dev   # development
    pnpm run build && pnpm run start  # production

API documentation

  • Base URL: /api/v1
  • Authentication: JWT access token and refresh token stored in cookies
  • Main endpoints:
    • /auth for signup, signin, refresh, and logout
    • /users for admin user management
    • /records for record CRUD and pagination
    • /dashboard for summary, trends, recent transactions, and categories

API Response Format

All API responses follow a consistent format:

Success Response

{
  "success": true,
  "message": "...",
  "data": { ... },
  "error": null
}

Error Response

{
  "success": false,
  "message": "...",
  "data": null,
  "error": { ... }
}

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details

About

The system demonstrates role-based access control, advanced pagination, rate limiting.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors