A backend API for a mock rental service, built with Node.js and Supabase to simulate real-world workflows. Implements RESTful routes for gear management with PostgreSQL integration, structured using MVC patterns and tested with Postman.
- Node.js / Express
- Supabase (PostgreSQL)
modulr/
├── src/
│ ├── controllers/
│ │ └── gearController.js
│ ├── models/
│ │ └── gearModel.js
│ ├── routes/
│ │ └── gearRoutes.js
│ ├── services/
│ │ └── supabaseClient.js
│ └── server.js
├── .env
└── package.json
- Git
- Supabase
- Node.js & NPM
- Postman (for manual API testing)
$ git clone https://github.com/johnshields/modulr.git
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
SQL script located here sql/modulr_db.sql
$ cd modulr/
$ npm install
$ npm run dev
- The API will listen on: http://localhost:8080/
- View API Swagger docs: http://localhost:8080/api/swagger
📦 API Endpoints
GET /api/gear
- List all gearGET /api/gear/:id
- Get gear by IDPOST /api/gear
- Add new gearPUT /api/gear/:id
- Update gearDELETE /api/gear/:id
- Delete gear