This is the backend service for your application. It provides APIs for managing transactions.
Frontend Service : https://transaction-dashboard-frontend.onrender.com/
To get started with the backend service, follow these steps:
- Clone the repository:
git clone https://github.com/md-abid-hussain/roxiler-backend
- Change directory:
cd roxiler-backend
- Install dependencies:
npm install
- Set up mongodb database
- Create
.env
file same as.env.example
- Run
npx prisma db push
- Run seed script to populate the database with initial data:
npx prisma db seed
- Start the server:
npm run dev
All endpoints require month as query parameter which accept number range from 1 to 12.
Example
: https://transaction-backend.onrender.com/api/v1/transactions?month=1
Returns all transactions. Supports pagination and search as well
Example
: https://transaction-backend.onrender.com/api/v1/transactions?month=7¤tPage=1&limit=10
- URL:
/api/v1/transactions?month=1
- Method:
GET
- Query Param:
month
(required) - Response: JSON array of transactions
Returns statistics about transactions.
- URL:
https://transaction-backend.onrender.com/api/v1/transactions/stats?month=1
- Method:
GET
- Response: JSON object with transaction statistics
Returns data for a bar chart visualization of transactions.
- URL:
https://transaction-backend.onrender.com/api/v1/transactions/bar-chart?month=1
- Method:
GET
- Response: JSON array of data for the bar chart
Returns data for a pie chart visualization of transactions.
- URL:
https://transaction-backend.onrender.com/api/v1/transactions/pie-chart?month=1
- Method:
GET
- Response: JSON array of data for the pie chart
Returns monthly statistics about transactions.
- URL:
https://transaction-backend.onrender.com/api/v1/transactions/monthly-stats?month=1
- Method:
GET
- Response: JSON object with monthly transaction statistics