A peer-to-peer rental marketplace designed specifically for college students! Simplify renting or listing rooms, discovering local perks, and connecting with others on campus.
CampusBnB is a full-stack web application built with Django REST Framework (backend) and React (frontend), styled using Tailwind CSS. It streamlines the rental experience for college students, helping them find nearby rooms, book campus perks, and curate wishlists.
Take a glimpse of the key features and interface:
- JWT-based login and signup
Securely authenticate users using JSON Web Tokens (JWT). - Token refresh for session management.
- Near Campus Search: Discover rooms close to your campus with location-based filtering.
- Detailed View: Check room details, amenities, and availability.
- Photos: Upload, view, or delete room photos.
- Reviews: Leave and read reviews for rooms.
- Bookings: Book rooms or check availability.
- Explore local campus perks and experiences, such as events, discounts, and activities.
- Local Suggestions: Get recommendations for rooms, experiences, and amenities near your campus.
- Upload and manage photos related to rooms and perks.
- Curate your favorite rooms and perks.
- Toggle rooms in and out of wishlists.
- React: Component-based UI development.
- Tailwind CSS: Utility-first styling for modern, responsive design.
- Axios: Handle API requests.
- Django: High-level Python framework for robust backend development.
- Django REST Framework (DRF): Create RESTful APIs.
- JWT Authentication: Secure authentication and token management.
- SQLite (or PostgreSQL for development).
- AWS S3 / Local Storage.
Method | Endpoint | Description |
---|---|---|
POST | /signup/ |
Register a new user |
POST | /login/ |
Authenticate and login |
POST | /token/ |
Obtain JWT tokens |
POST | /token/refresh/ |
Refresh JWT token |
Method | Endpoint | Description |
---|---|---|
GET | /photos/ |
List all photos |
GET | /photos/get-photo/ |
Serve a specific photo |
POST | /photos/upload/ |
Get upload URL for new photos |
DELETE | /photos/delete/<pk>/ |
Delete a photo by ID |
Method | Endpoint | Description |
---|---|---|
GET | /rooms/ |
List all available rooms |
GET | /rooms/<pk>/ |
Retrieve details of a room |
GET | /rooms/near-campus/ |
Discover rooms near campus |
GET | /rooms/<pk>/reviews/ |
Get reviews for a specific room |
POST | /rooms/<pk>/bookings/ |
Create a booking for a room |
GET | /rooms/<pk>/bookings/check/ |
Check booking availability |
Method | Endpoint | Description |
---|---|---|
GET | /perks/ |
List all perks |
GET | /perks/<pk>/ |
Retrieve details of a perk |
Method | Endpoint | Description |
---|---|---|
GET | /wishlists/ |
List all wishlists |
GET | /wishlists/<pk>/ |
Retrieve a specific wishlist |
POST | /wishlists/<pk>/rooms/<room_pk>/ |
Toggle a room in/out of wishlist |
- Clone the repository:
git clone https://github.com/yourusername/CampusBnB.git cd campusbnb/backend
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Apply migrations:
python manage.py migrate
- Start the server:
git clone https://github.com/yourusername/CampusBnB.git cd campusbnb/backend
- Clone the repository:
python manage.py runserver
- Navigate to the frontend directory:
cd ../frontend
- Install dependencies:
npm install
- Start the React development server:
npm run dev
At CampusBnB We welcome contributions! Please fork this repository and submit a pull request with detailed changes. Ensure all new features are covered by tests.