ReadCycle - Book Sharing Platform

Project Documentation

Prepared by: Development Team
Date: November 15, 2025
Version: 1.0

Table of Contents

  1. Introduction
  2. Project Objectives
  3. Technology Stack
  4. System Architecture
  5. Database Design
  6. User Flow
  7. Features
  8. API Endpoints
  9. Security Features
  10. Deployment
  11. Appendices

1. Introduction

ReadCycle is a web-based book sharing platform designed for students and book lovers in Bangladesh. The main idea is to help people share their books with each other instead of buying new books every time. This helps save money and also helps the environment by reducing waste.

The platform allows users to:

2. Project Objectives

2.1 Main Objectives

2.2 Technical Objectives

3. Technology Stack

3.1 Backend Technologies

3.2 Frontend Technologies

3.3 Additional Tools

4. System Architecture

4.1 Overall Architecture

User Interface
(Web Browser)
Laravel Application
(PHP Framework)
MySQL Database

4.2 MVC Pattern

The application follows the Model-View-Controller (MVC) pattern:

5. Database Design

5.1 Entity Relationship Diagram

Users
1
1:N
Books
N
N:1
Categories
1


Books
1
1:N
Swaps
N
N:1
Users
1

5.2 Database Tables

5.2.1 Users Table

Column Name Data Type Description
id BIGINT Primary key, auto increment
name VARCHAR(255) User's full name
email VARCHAR(255) User's email address (unique)
university_name VARCHAR(255) Name of university
department VARCHAR(255) Department/Subject
year VARCHAR(50) Academic year (1st, 2nd, 3rd, 4th)
password VARCHAR(255) Hashed password
profile_picture VARCHAR(255) Path to profile picture
created_at TIMESTAMP Account creation time
updated_at TIMESTAMP Last update time

5.2.2 Categories Table

Column Name Data Type Description
id BIGINT Primary key, auto increment
name VARCHAR(255) Category name (unique)
created_at TIMESTAMP Creation time
updated_at TIMESTAMP Last update time

5.2.3 Books Table

Column Name Data Type Description
id BIGINT Primary key, auto increment
user_id BIGINT Foreign key to users table
category_id BIGINT Foreign key to categories table
title VARCHAR(255) Book title
description TEXT Book description
photo_path VARCHAR(255) Path to book cover image
created_at TIMESTAMP Creation time
updated_at TIMESTAMP Last update time

5.2.4 Swaps Table

Column Name Data Type Description
id BIGINT Primary key, auto increment
book_requested_id BIGINT Foreign key to books table (book being requested)
book_offered_id BIGINT Foreign key to books table (book being offered)
requester_id BIGINT Foreign key to users table (person making request)
status ENUM pending, accepted, declined
created_at TIMESTAMP Request creation time
updated_at TIMESTAMP Last update time

6. User Flow

6.1 Registration and Login Flow

User visits website
Choose: Register or Login
Fill registration form
(Name, Email, University, etc.)
Account created successfully
Redirect to Dashboard

6.2 Book Sharing Flow

User logs in
Go to "My Books" section
Click "Add New Book"
Fill book details
(Title, Category, Description, Image)
Book added to platform

6.3 Book Swap Flow

User finds a book they want
Click "Request Swap"
Select a book to offer in exchange
Send swap request
Book owner receives notification
Owner can Accept or Decline

7. Features

7.1 User Management

7.2 Book Management

7.3 Category Management

7.4 Swap System

7.5 Dashboard

8. API Endpoints

8.1 Authentication Endpoints

POST /api/register - Register new user POST /api/login - User login POST /api/logout - User logout (requires authentication)

8.2 User Endpoints

GET /api/users - Get all users (requires authentication) GET /api/users/{id} - Get specific user PUT /api/users/{id} - Update user profile DELETE /api/users/{id} - Delete user account

8.3 Book Endpoints

GET /api/books - Get all books (public) GET /api/books/{id} - Get specific book (public) POST /api/books - Add new book (requires authentication) PUT /api/books/{id} - Update book (requires authentication) DELETE /api/books/{id} - Delete book (requires authentication)

8.4 Category Endpoints

GET /api/categories - Get all categories (public) GET /api/categories/{id} - Get specific category (public) POST /api/categories - Add new category (requires authentication) PUT /api/categories/{id} - Update category (requires authentication) DELETE /api/categories/{id} - Delete category (requires authentication)

8.5 Swap Endpoints

GET /api/swaps - Get user's swaps (requires authentication) POST /api/swaps - Create new swap request (requires authentication) GET /api/swaps/{id} - Get specific swap details PUT /api/swaps/{id} - Update swap request DELETE /api/swaps/{id} - Cancel swap request POST /api/swaps/update-status - Update swap status

9. Security Features

9.1 Authentication

9.2 Authorization

9.3 Data Validation

10. Deployment

10.1 System Requirements

10.2 Installation Steps

  1. Clone the repository from Git
  2. Install PHP dependencies using Composer
  3. Copy .env.example to .env and configure database
  4. Generate application key
  5. Run database migrations
  6. Seed the database with sample data
  7. Configure web server to point to public directory

11. Appendices

Appendix A: Color Scheme

The application uses a green color scheme representing nature and sustainability:

Appendix B: File Structure

readcycle-laravel/ ├── app/ │ ├── Http/Controllers/ │ │ ├── Api/ (API Controllers) │ │ ├── Auth/ (Authentication Controllers) │ │ └── Dashboard/ (Dashboard Controllers) │ ├── Models/ (Database Models) │ ├── Policies/ (Authorization Policies) │ └── Services/ (Business Logic Services) ├── database/ │ ├── migrations/ (Database Schema) │ └── seeders/ (Sample Data) ├── public/ │ ├── assets/ (CSS, JS, Images) │ └── storage/ (Uploaded Files) ├── resources/ │ ├── views/ (Blade Templates) │ └── lang/ (Language Files) └── routes/ ├── api.php (API Routes) └── web.php (Web Routes)

Appendix C: Database Seeder Data

The application includes sample data for testing:

Appendix D: Bengali Language Support

The application supports Bengali language:

Appendix E: Future Enhancements

Planned features for future versions:

End of Documentation

This document provides a complete overview of the ReadCycle project, including technical specifications, database design, and implementation details.