Skip to content

Chamanthi17/Student-Accomodation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏨 Student Accommodation Management System

A user-friendly web application that streamlines the process of on-campus housing allocation in universities. Students can log in to search for available rooms, request accommodations, make reservations, and manage payments. Admins can monitor requests, assign rooms, and track transactions — all in one place.

This project ensures better data organization, security, and a more seamless experience for both students and administrators.

🧰 Tech Stack

Backend: Python (Flask)

Database: MongoDB (Atlas)

Frontend: HTML, CSS

🗄️ MongoDB Collections

The data is structured using separate MongoDB collections to simplify access and manipulation:

Admin Stores admin login credentials and roles

Building Contains details of each campus building

Rooms Information about rooms in each building

Students Student profiles and login data

Requests Student room requests

Payment Records of accommodation payments

📦 Features

🔐 Student login and dashboard

📝 Submit and track room requests

🧾 Admin panel to review and manage accommodations

🏢 Manage buildings and room inventories

💳 Simulated payment handling

📊 Modular backend for scalability

🛠 Local Setup (Improved)

  1. Clone the Repository

git clone https://github.com/your-username/student-accommodation-system.git

cd student-accommodation-system

  1. Create and Activate a Virtual Environment

python -m venv venv

source venv/bin/activate # Windows: venv\Scripts\activate

  1. Install Dependencies

pip install -r requirements.txt

  1. Set Up Environment Variables

Create a .env file in the project root (do NOT commit this file):

MONGO_URI=your_mongodb_connection_string_here

Optionally, use the .env.example file as a template for environment variables (create this file if you want):

.env.example

MONGO_URI=your_mongodb_connection_string_here

If your app uses python-dotenv (recommended), it will automatically load variables from .env.

  1. Run the Application

Make sure your app.py runs the Flask app like this:

if name == 'main':

app.run(host='0.0.0.0', port=5000, debug=True)

Then start it:

python app.py

Open your browser at:

http://localhost:5000

⚠️ Common Issues

MongoDB Connection Errors:

Check if your MONGO_URI is correct, and whitelist your IP in MongoDB Atlas.

Port Already in Use:

Change the port in app.run() if 5000 is busy.

Environment Variables Not Loaded:

Ensure .env file exists and, if needed, you installed python-dotenv and imported it in your app.py like:

from dotenv import load_dotenv

load_dotenv()

🙋‍♀️ Author

Chamanthi Pyneni

This project gave me practical experience working with MongoDB for dynamic and nested data management in a real-world university housing scenario.

About

A web-based University Housing Management System built with Python, Flask and MongoDB. Allows students to register, apply for accommodation, and lets admins manage room allotments efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors