A web application for managing bills and payments in shared living situations, built with a focus on portable deployment through virtualization. This project allows tenants to track their bills and property managers to oversee multiple properties and assign bills to tenants. By leveraging containerization technology, the Flat Bills Tracker ensures consistent performance across various computing environments.
Developed by Anthony Dong (2169260) and Callum Sullivan.
- Features
- Technology Stack
- Project Structure
- Setup and Installation
- Usage
- Development
- Contributing
- License
- Contact
- User authentication through email and password with session management
- Tenant features:
- Sign up and assign themselves to a property
- View and edit personal details
- View property details including the landlords contacts
- Add and track personal bills
- View all bills associated with their property
- View and change to different properties
- Property manager features:
- Sign up under a company
- View and edit personal details
- Add a new property to the database
- Overview and manage multiple properties
- Remove tenants from a property
- Assigning bills to individual tenants or entire properties
- Frontend: HTML, CSS, EJS templates
- Backend: Node.js with Express.js
- Database: MySQL
- Containerization: Docker and Docker Compose
- Version Control: Git
The project is organized into three main components:
- Tenant Service: Handles tenant-related functionalities
- Manager Service: Manages property manager functionalities
- Database Service: MySQL database for data storage
Each service runs in its own Docker container, ensuring isolation and easy deployment. The tenant and manager services communicate with each other via the database service. Both services access the database using Express, with API endpoints handling the HTTP requests.
-
Clone the repository:
git clone <repository-url> cd rental
-
Ensure Docker and Docker Compose are installed on your system.
-
Build and start the containers:
docker-compose up --build
Or on some systems:
docker compose up build
-
The application will be available at:
- Tenant Portal: http://localhost:3000
- Manager Portal: http://localhost:3001
- Navigate to http://localhost:3000
- Register a new account or log in
- Select your property
- Add and manage your bills
- Navigate to http://localhost:3001
- Register a new account or log in
- Add properties and manage tenants
- Assign bills to properties or individual tenants
To modify the application:
-
Make changes to the relevant files in the
tenant
ormanager
directories. -
Rebuild the Docker containers:
docker-compose down -v docker-compose up --build
Or on some systems:
docker compose down -v docker compose up --build
If a user wishes to maintain the state of the system:
docker-compose down docker-compose up --build
-
Update the schema in
schema.sql
-
Modify the
data.sql
file for any changes to the initial test data -
Run the following command from a terminal in the project directory to access the database for debugging purposes:
docker-compose exec db mysql -u root -p
Enter the password
rootpassword
when prompted. -
To view the database tables, run:
-
use DB;
to select the database -
show tables;
to list all tables -
SELECT * FROM <table-name>
to list the details of the table-name
We welcome contributions to improve the Flat Bills Tracker. Please follow these steps:
- Fork the repository
- Create a new branch for your feature
- Commit your changes
- Push to your branch
- Create a new Pull Request
This project is licensed under the MIT License.
For any questions or support, please contact the project maintainers: