A robust backend service for managing POS operations, built with Node.js, TypeScript, and Prisma.
POS Padi Express provides a secure and scalable API for handling core features related to transactions, disputes, and notifications within a POS (Point of Sale) ecosystem.
- Transaction creation, listing, and per-agent analytics
- Dispute management (create, view, update, delete, statistics)
- Notification system with read tracking
- Node.js
- TypeScript
- Express.js
- Prisma ORM
- MySQL
- Jest (for testing)
- Node.js β₯ 16.x
- npm or yarn
- MySQL
- Prisma CLI
- Clone the repository:
git clone https://github.com/InternPulse/pos-padi-express-backend.git
- Change into the parent directory:
cd pos-padi-express-backend
- Set appropriate values for the following Compulsory Environment Variables:
# Postgres connection string
DATABASE_URL=""
# Secret key for signing JWTs
JWT_SECRET_KEY=
# API Port
PORT=5000
- Install the App dependencies:
npm install
- Generate Prisma client and apply migrations:
npx prisma generate
npx prisma migrate deploy
- Start the App:
npm run dev
The API should now be running locally at http://localhost:5000/
You can explore and test the endpoints via the live Postman documentation:
Here's an overview of available routes:
GET /api/v1/disputes β List all disputes
GET /api/v1/disputes/:id β Get a single dispute by ID
POST /api/v1/disputes β Create a new dispute
PUT /api/v1/disputes/:id β Update a dispute
DELETE /api/v1/disputes/:id β Delete a dispute
GET /api/v1/disputes/stats β Get dispute statistics
POST /api/v1/notifications β Create a new notification
GET /api/v1/notifications β Get all notifications (with query filters)
GET /api/v1/notifications/:id β Get a single notification by ID
PATCH /api/v1/notifications/:id/read β Mark a notification as read
POST /api/v1/transactions β Create a new transaction
GET /api/v1/transactions β List all transactions
GET /api/v1/transactions/:id β Get a transaction by ID
PUT /api/v1/transactions/:id β Update a transaction
DELETE /api/v1/transactions/:id β Delete a transaction
GET /api/v1/transactions/stats β Get overall transaction statistics
GET /api/v1/transactions/agent/:agent_id/stats β Get transaction stats for a specific agent
npm test
- Fork the repo
- Create your branch (git checkout -b feat/feature-name)
- Commit your changes
- Push and open a Pull Request