Backend API for My Ulo, a PropTech platform that helps Nigerians find verified rental and purchase properties through identity-verified agents and landlords, location-aware property data, secure payments, and transparent property reviews.
- Prerequisites
- Tech Stack
- Current API Surface
- Project Structure
- Getting Started
- Environment Variables
- Available Scripts
- Development Workflow
- Testing
- Git Workflow and Commit Convention
- Before You Push – Sync Your Env
Before you begin, ensure you have the following installed:
| Tool | Notes |
|---|---|
| Node.js | Current LTS version recommended |
| npm | Default package manager for this project |
| PostgreSQL | Database server |
| PostGIS | PostgreSQL spatial extension |
Do not mix package managers. This project uses npm.
- Runtime — Node.js
- Framework — Express.js
- Language — TypeScript
- Database — PostgreSQL
- ORM — Drizzle ORM
- Spatial Database — PostGIS
- Validation — Zod
- Authentication — JWT + Argon2
- File Storage — Cloudinary
- Identity Verification — Smile Identity
- Payments — Paystack
- Logging — Pino + pino-http
- Security — Helmet, CORS, Cookie Parser, Rate Limiter
- API Documentation — Swagger (OpenAPI)
- Git Hooks — Husky + Commitlint
The backend currently provides the project foundation while feature modules are being developed.
Current endpoints include:
GET /health- API routes mounted under
/api/v1 - Global error handling
- Request logging
- Swagger documentation setup
.
├── .github/
├── .husky/
├── scripts/
├── src/
│ ├── app.ts
│ ├── server.ts
│ ├── config/
│ ├── constants/
│ ├── controllers/
│ ├── db/
│ │ ├── schema/
│ │ ├── migrations/
│ │ ├── index.ts
│ │ └── seed.ts
│ ├── docs/
│ ├── errors/
│ ├── lib/
│ ├── middlewares/
│ ├── routes/
│ ├── services/
│ ├── templates/
│ ├── types/
│ ├── utils/
│ └── validations/
├── .env.example
├── drizzle.config.ts
├── package.json
├── README.md
└── tsconfig.json
config/contains application configuration.controllers/handles incoming HTTP requests.services/contains business logic.routes/defines API endpoints.db/manages database configuration, migrations, seeding, and schema definitions.middlewares/contains reusable Express middleware.validations/stores Zod validation schemas.docs/contains Swagger/OpenAPI documentation.
git clone https://github.com/Group-2-Build-SZN/node-backend.git
cd my-ulo-backendnpm installcp .env.example .envUpdate the values in .env.
npm run migratenpm run devGET http://localhost:5000/healthThe application uses environment variables stored in .env.
Common variables include:
| Variable | Description |
|---|---|
| NODE_ENV | Application environment |
| PORT | Server port |
| DATABASE_URL | PostgreSQL connection string |
| JWT_SECRET | JWT signing secret |
| JWT_REFRESH_SECRET | Refresh token secret |
| CLOUDINARY_CLOUD_NAME | Cloudinary configuration |
| CLOUDINARY_API_KEY | Cloudinary configuration |
| CLOUDINARY_API_SECRET | Cloudinary configuration |
| PAYSTACK_SECRET_KEY | Paystack Secret Key |
| PAYSTACK_WEBHOOK_SECRET | Paystack Webhook Secret |
| SMILE_ID_API_KEY | Smile Identity API Key |
Never commit your .env file.
| Script | Description |
|---|---|
| npm run dev | Start development server |
| npm run build | Build the application |
| npm start | Run production build |
| npm run type-check | Run TypeScript checks |
| npm run lint | Run linting |
| npm run format | Format source files |
| npm run generate | Generate Drizzle migrations |
| npm run migrate | Run database migrations |
| npm run seed | Seed the database |
| npm run prepare | Install Git hooks |
- Pull the latest changes from the
devbranch. - Create a feature branch.
Example:
feat/authentication
feat/property-module
fix/payment-webhook
- Implement your feature.
- Run:
npm run lint
npm run type-check- Commit using Conventional Commits.
- Push your branch.
- Open a Pull Request into
dev.
Automated tests will be added as the project evolves.
Future tests should cover:
- Authentication
- Property Management
- Reviews
- Payments
- Verification
- Location Services
This repository follows Conventional Commits.
feat(auth): implement login endpoint
feat(property): add property creation endpoint
fix(payment): handle failed webhook verification
refactor(review): simplify review service
docs: update README
chore: initialize backend project
Whenever a new environment variable is introduced:
- Update your local
.env - Update
.env.example - Never commit secrets
- Verify all required keys are documented