A government-grade platform that digitizes the management of state-owned real estate across the country — replacing paper-based records with a centralized, secure, and auditable system.
Government property management in Afghanistan has historically relied on paper records and manual processes — making it slow, error-prone, and impossible to audit at scale. REMS replaces this with a centralized digital platform where officials can register, track, assign, and report on state-owned properties across the entire country in real time.
- 🔐 JWT Authentication — secure login with access & refresh token rotation
- 👥 Role-Based Access Control — three roles:
Admin,Officer, andViewerwith fine-grained permissions - 🏠 Property Registration & Tracking — register and manage government-owned properties nationwide
- 🗂️ Staff & Department Assignments — assign properties to specific departments or officials
- 📄 Lease & Trade Contract Management — create, track, and manage property contracts end-to-end
- 📊 Government Reports & Dashboards — real-time visibility over national property assets with exportable reports
- ✅ Full Test Coverage — unit and integration tests across the backend
The project is split into two independent applications:
Real-Estate-Management-System/
├── backend/ # NestJS REST API
│ ├── src/
│ │ ├── auth/ # JWT strategy, guards, refresh tokens
│ │ ├── users/ # User management & roles
│ │ ├── properties/ # Property registration & tracking
│ │ ├── assignments/ # Department & staff assignments
│ │ ├── contracts/ # Lease & trade contracts
│ │ ├── reports/ # Dashboard & export logic
│ │ └── common/ # Shared decorators, pipes, filters
│ └── test/
└── frontend/ # React + Tailwind CSS
├── src/
│ ├── components/
│ ├── pages/
│ ├── hooks/
│ └── services/ # API client layer
- Node.js 18+
- PostgreSQL 14+
- npm or yarn
git clone https://github.com/Sajjad-Matin/Real-Estate-Management-System.git
cd Real-Estate-Management-Systemcd backend
npm installCreate a .env file in the backend/ directory:
DATABASE_URL=postgresql://user:password@localhost:5432/rems
JWT_SECRET=your_jwt_secret
JWT_REFRESH_SECRET=your_jwt_refresh_secret
PORT=3000
SMTP_PORT=587Run database migrations and start the server:
npm run migration:run
npm run start:devcd ../frontend
npm install
npm run devThe frontend will be available at http://localhost:5173
The API will be available at http://localhost:3000
cd backend
# Unit tests
npm run test
# End-to-end tests
npm run test:e2e
# Test coverage report
npm run test:cov| Feature | Admin | Officer | Viewer |
|---|---|---|---|
| Register properties | ✅ | ✅ | ❌ |
| Assign to departments | ✅ | ✅ | ❌ |
| Manage contracts | ✅ | ✅ | ❌ |
| View reports | ✅ | ✅ | ✅ |
| Manage users | ✅ | ❌ | ❌ |
| Export reports | ✅ | ✅ | ❌ |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /auth/login |
Login & get tokens | Public |
| POST | /auth/refresh |
Refresh access token | Public |
| GET | /properties |
List all properties | Required |
| POST | /properties |
Register new property | Admin/Officer |
| GET | /properties/:id |
Get property details | Required |
| POST | /assignments |
Assign property to dept. | Admin/Officer |
| GET | /contracts |
List all contracts | Required |
| POST | /contracts |
Create new contract | Admin/Officer |
| GET | /reports/dashboard |
Get dashboard stats | Required |
- Docker & Docker Compose setup
- PDF contract generation
- Audit log for all property changes
- Notifications via email (SMTP ready)
- Advanced filtering & search across properties
Sajjad Matin
- Portfolio: my-portfolio-vert-seven.vercel.app
- LinkedIn: sajjad-matin-mahmodi
- Email: [email protected]
This project is open source and available under the MIT License.