Backend of Runner City Housing Management System (RCHMS), a secure web-based SaaS platform for managing fees, payroll, and community operations in residential complexes. Built with Node.js, Express, and MySQL, it provides RESTful APIs, authentication, and role-based access for seamless integration with the frontend.
- Features
- Tech Stack
- Installation
- Configuration
- API Endpoints
- Authentication & Authorization
- Deployment
- Contributing
- License
-
Secure RESTful APIs for managing residents, fees, and payroll.
-
Role-based access control (Admin, Resident, Staff).
-
Payment tracking and fee automation.
-
Community event management.
-
Integration-ready with the React.js frontend.
-
Error handling and logging for robust operations.
-
Backend: Node.js, Express.js
-
Database: MySQL
-
Authentication: JWT, Role-based Access
-
Containerization: Docker (optional)
-
CI/CD: GitHub Actions / Render
# Clone the repository
git clone https://github.com/Sabbirbracu/RunnerCityHousing_Backend.git
# Navigate into the project directory
cd RunnerCityHousing_Backend
# Install dependencies
npm install
Create a .env file in the root directory with the following variables:
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_NAME=your_database_name
JWT_SECRET=your_jwt_secret
PORT=5000
-
POST /api/auth/register – Register a new user
-
POST /api/auth/login – Login and get JWT
-
GET /api/residents – Get all residents
-
POST /api/residents – Add a new resident
- GET /api/fees – Get fee details
*POST /api/fees – Add fee record
-
GET /api/payroll – Get payroll records
-
POST /api/payroll – Add payroll entry
JWT-based authentication for secure API access
Role-based access to restrict sensitive endpoints
Middleware for validating tokens and user roles
Recommended deployment using Render, AWS, or Docker containers
Ensure database is running and .env is properly configured
Set up CI/CD pipelines for automated testing and deployment
Contributing
Fork the repository
Create your feature branch (git checkout -b feature/your-feature)
Commit your changes (git commit -m 'Add some feature')
Push to the branch (git push origin feature/your-feature)
Open a Pull Request
License
This project is licensed under the MIT License.