Skip to content

KabilanRog/bookswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 BookSwap — Student Used Book Marketplace

A Django web app for students to buy and sell used textbooks.


⚡ Quick Setup (VS Code)

1. Open in VS Code

File → Open Folder → select the `bookstore` folder

2. Install VS Code Extensions

  • Python (Microsoft)
  • Django (Baptiste Darthenay)
  • Pylance (Microsoft)

3. Create Virtual Environment

Open Terminal in VS Code (`Ctrl + ``) and run:

# Create virtual environment
python -m venv venv

# Activate it (Windows)
venv\Scripts\activate

# Activate it (Mac/Linux)
source venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

5. Run Migrations

python manage.py makemigrations
python manage.py migrate

6. Create Admin User

python manage.py createsuperuser

7. Start the Server

python manage.py runserver

Visit: http://127.0.0.1:8000 Admin panel: http://127.0.0.1:8000/admin


🗂️ Project Structure

bookstore/
├── bookstore/          # Main Django project settings
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── books/              # Book listings app
│   ├── models.py       # Book, Wishlist, Message models
│   ├── views.py        # All book views
│   ├── forms.py        # Book forms
│   ├── urls.py
│   └── admin.py
├── users/              # Custom user app
│   ├── models.py       # CustomUser model
│   ├── views.py        # Register, login, profile views
│   ├── forms.py        # Auth & profile forms
│   ├── urls.py
│   └── admin.py
├── templates/          # HTML templates
│   ├── base.html       # Navbar, footer, layout
│   ├── books/
│   └── users/
├── static/
│   ├── css/style.css   # All styles
│   └── js/main.js
├── media/              # Uploaded images (auto-created)
├── requirements.txt
└── manage.py

✨ Features

Feature Description
🔐 Auth Register, Login, Logout with custom user model
📖 List Books Post books with image, price, condition, category
🔍 Search & Filter Search by title/author, filter by category/condition/price
💬 Messaging Buyers can message sellers directly
❤️ Wishlist Save books to wishlist
👤 Profiles Student profiles with college info
✅ Mark as Sold Sellers can mark books as sold
🗂️ Categories Engineering, Medical, Science, Commerce, Arts, etc.
🛠️ Admin Panel Manage all books, users, messages

🛠️ Tech Stack

  • Backend: Django 4.2
  • Database: SQLite (dev) — switch to PostgreSQL for production
  • Frontend: Bootstrap 5 + Custom CSS
  • Image Handling: Pillow

🔧 VS Code Tips

  • Press F5 to run the server using the launch config
  • Use Ctrl+Shift+PPython: Select Interpreter → choose venv
  • Django HTML templates get syntax highlighting with the Django extension

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors