Skip to content

SillyCatto/boibritto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š BoiBritto - Complete Literary Community Platform

Next.js React Node.js MongoDB Firebase TypeScript TailwindCSS

🌟 A comprehensive literary platform - Connecting book lovers, readers, and hobbyist writers in one unified ecosystem

🌟 Project Overview

BoiBritto is a modern, full-stack literary community platform that brings together book enthusiasts, aspiring writers, and passionate readers. The platform provides a comprehensive suite of tools for book discovery, collection management, reading tracking, community discussions, and creative writing - all wrapped in a beautiful, responsive interface.

🎯 The Problem We Solve

The literary community lacks a unified platform that addresses all aspects of the reading and writing experience:

  • Fragmented Tools: Readers use multiple platforms for discovery, tracking, and discussion
  • Limited Social Features: Most platforms lack meaningful community interaction
  • Poor Writing Support: Aspiring writers have limited platforms for sharing and feedback
  • Inadequate Progress Tracking: Reading progress and recommendations are often disconnected
  • No Creative Outlet: Limited platforms for both consuming and creating literary content

πŸ’‘ Our Solution

BoiBritto delivers a complete literary ecosystem with integrated features:

πŸ“– Smart Book Discovery: Advanced search and filtering with Google Books API integration
πŸ“š Personal Collections: Curated book lists with privacy controls and social sharing
πŸ“Š Reading Tracker: Comprehensive progress tracking with intelligent recommendations
✍️ Creative Writing: Full-featured writing platform with chapter management
πŸ’¬ Community Discussions: Rich discussion forums with spoiler controls and moderation
πŸ“ Literary Blogs: Markdown-supported blogging with genre tagging
πŸ”’ Advanced Privacy: Granular visibility controls for all content types


✨ Key Features

πŸ“– Book Discovery & Management

  • Google Books Integration: Access to millions of books with rich metadata
  • Advanced Search: Filter by genre, author, publication date, and more
  • Personal Collections: Create and organize custom book collections
  • Smart Recommendations: Suggestions based on reading history
  • Collection Sharing: Public, friends-only, or private collection visibility

πŸ“Š Reading Progress Tracking

  • Status Management: Track books as interested, reading, or completed
  • Date Validation: Smart date controls preventing future dates and logical constraints
  • Progress Analytics: Visual insights into reading habits and genre preferences
  • Reading Goals: Set and track annual reading targets
  • Genre-Based Recommendations: Top 5 most-read genres analysis

✍️ Creative Writing Platform

  • User Book Creation: Full-featured book creation with metadata management
  • Chapter Management: Organize content with chapter-by-chapter structure
  • Rich Text Editor: Markdown support for formatted content
  • Visibility Controls: Public, private, or friends-only publishing options
  • Like System: Community engagement with like/unlike functionality
  • Word Count Tracking: Automatic word count calculation and progress metrics

πŸ’¬ Community Discussions

  • Rich Discussion Forums: Create and participate in literary discussions
  • Hierarchical Comments: Nested comment system with 1-level deep replies
  • Spoiler Controls: Built-in spoiler alert system for sensitive content
  • Genre Tagging: Categorize discussions by literary genres
  • Moderation Tools: Community reporting and content flagging system

πŸ“ Literary Blogging

  • Markdown Support: Full markdown editing with live preview
  • Genre Classification: Tag blogs with relevant literary genres
  • Visibility Management: Control who can read your content
  • Spoiler Warnings: Protect readers from unwanted spoilers
  • Social Sharing: Share insights with the community

πŸ‘₯ User Profiles & Social Features

  • Rich Profiles: Customizable profiles with bio, avatar, and interested genres
  • Activity Feeds: See updates from followed users and community activity
  • Privacy Controls: Granular control over profile and content visibility
  • Follow System: Build connections with other literary enthusiasts

πŸ”’ Security & Moderation

  • Firebase Authentication: Secure Google-based authentication
  • Content Reporting: Comprehensive reporting system for inappropriate content
  • Moderation Tools: Admin panel for content and user management
  • Privacy Controls: User-controlled visibility settings for all content types

πŸ› οΈ Admin Features

  • AdminJS Integration: Comprehensive backend administration interface
  • User Management: Admin tools for user account management
  • Content Moderation: Review and moderate discussions, blogs, and user content
  • Analytics Dashboard: Platform usage and engagement metrics
  • Database Management: Direct access to all data models and relationships

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
Next.js 15.3.3 React framework with SSR/SSG and App Router
React 19.0.0 Modern UI component library
TypeScript 5.0 Type-safe JavaScript development
TailwindCSS 4.0 Utility-first CSS framework
Lucide React 0.511.0 Modern icon library
Axios 1.10.0 HTTP client for API communication

Backend

Technology Version Purpose
Node.js Latest JavaScript runtime environment
Express.js 5.1.0 Web application framework
MongoDB Latest NoSQL database for flexible data storage
Mongoose 8.15.0 MongoDB object modeling and validation
Firebase Admin 13.4.0 Authentication and user management

APIs & Services

Service Purpose
Google Books API Book data, metadata, and cover images
Firebase Auth User authentication and session management
MongoDB Atlas Cloud database hosting and management

Development & Testing

Tool Purpose
Vitest Modern testing framework
ESLint Code linting and style enforcement
Prettier Code formatting
AdminJS Backend administration interface

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB database (local or Atlas)
  • Firebase project with Authentication enabled
  • Google Books API key

1. Clone the Repository

git clone https://github.com/your-username/boibritto.git
cd boibritto

2. Backend Setup

cd code/boibritto-server
npm install

# Create environment file
cp .env.example .env

Configure Environment Variables (.env):

# Database
MONGODB_URL=your_mongodb_connection_string

# Firebase Configuration
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_CLIENT_EMAIL=your_firebase_client_email
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"

# API Keys
WEB_API_KEY=your_google_books_api_key

# Server Configuration
PORT=5001
FRONTEND_URL=http://localhost:3000

3. Frontend Setup

cd ../boibritto-client
npm install

# Create environment file
cp .env.local.example .env.local

Configure Frontend Environment (.env.local):

NEXT_PUBLIC_API_URL=http://localhost:5001/api
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_web_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id

4. Run the Application

Start Backend Server

cd code/boibritto-server
npm run dev
# Server runs on http://localhost:5001

Start Frontend Development Server

cd code/boibritto-client
npm run dev
# Application runs on http://localhost:3000

5. Access the Application


πŸ—οΈ Project Architecture

boibritto/
β”œβ”€β”€ code/
β”‚   β”œβ”€β”€ boibritto-client/          # Next.js React frontend
β”‚   β”‚   β”œβ”€β”€ app/                   # App router pages
β”‚   β”‚   β”‚   β”œβ”€β”€ explore/          # Book discovery and search
β”‚   β”‚   β”‚   β”œβ”€β”€ collections/      # User collections management
β”‚   β”‚   β”‚   β”œβ”€β”€ readingitems/     # Reading list and progress tracking
β”‚   β”‚   β”‚   β”œβ”€β”€ discussions/      # Community discussion forums
β”‚   β”‚   β”‚   β”œβ”€β”€ blogs/            # Literary blogging platform
β”‚   β”‚   β”‚   β”œβ”€β”€ book/             # Individual book pages
β”‚   β”‚   β”‚   β”œβ”€β”€ profile/          # User profiles and settings
β”‚   β”‚   β”‚   └── ...              # Authentication and other pages
β”‚   β”‚   β”œβ”€β”€ components/            # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ home/             # Landing page components
β”‚   β”‚   β”‚   β”œβ”€β”€ book/             # Book-related components
β”‚   β”‚   β”‚   β”œβ”€β”€ profile/          # Profile and user components
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/           # Navigation and layout
β”‚   β”‚   β”‚   └── ui/               # Base UI components
β”‚   β”‚   β”œβ”€β”€ lib/                   # Utility functions & configs
β”‚   β”‚   └── public/                # Static assets
β”‚   └── boibritto-server/          # Express.js backend API
β”‚       β”œβ”€β”€ api/                   # Main application logic
β”‚       β”‚   β”œβ”€β”€ controllers/       # Request handlers
β”‚       β”‚   β”‚   β”œβ”€β”€ auth.controller.js      # Authentication
β”‚       β”‚   β”‚   β”œβ”€β”€ collection.controller.js # Collections management
β”‚       β”‚   β”‚   β”œβ”€β”€ readingList.controller.js # Reading progress
β”‚       β”‚   β”‚   β”œβ”€β”€ blog.controller.js      # Blogging system
β”‚       β”‚   β”‚   β”œβ”€β”€ discussion.controller.js # Discussion forums
β”‚       β”‚   β”‚   β”œβ”€β”€ comment.controller.js   # Comment system
β”‚       β”‚   β”‚   β”œβ”€β”€ userBook.controller.js  # User-created books
β”‚       β”‚   β”‚   β”œβ”€β”€ chapter.controller.js   # Book chapters
β”‚       β”‚   β”‚   └── report.controller.js    # Content reporting
β”‚       β”‚   β”œβ”€β”€ models/           # Database schemas
β”‚       β”‚   β”œβ”€β”€ routes/           # API endpoints
β”‚       β”‚   β”œβ”€β”€ middlewares/      # Custom middleware
β”‚       β”‚   └── utils/            # Helper functions
β”‚       β”œβ”€β”€ tests/                # Comprehensive test suites
β”‚       └── components/           # Admin panel components
└── README.md                     # Project documentation

πŸ”— API Overview & Documentation

πŸ“š Comprehensive API Documentation

API Documentation

πŸ“– For detailed API documentation, request/response examples, authentication flows, and testing guides, check the API Documentation

πŸš€ Quick API Reference

Our RESTful API provides comprehensive endpoints for all platform features:

πŸ” Authentication & User Management

GET  /api/auth/login          # Firebase token authentication
POST /api/auth/signup         # New user registration
GET  /api/profile/me          # Get current user profile
PATCH /api/profile/me         # Update user information
GET  /api/profile/:userID     # Get public user profile

πŸ“š Collections & Library Management

GET    /api/collections       # List collections (with filtering)
POST   /api/collections       # Create new collection
GET    /api/collections/:id   # Get specific collection
PATCH  /api/collections/:id   # Update collection
DELETE /api/collections/:id   # Delete collection

πŸ“– Reading Lists & Progress Tracking

GET    /api/reading-list/me           # Get user's reading list
GET    /api/reading-list/:userID      # Get public reading list
POST   /api/reading-list              # Add book to reading list
PATCH  /api/reading-list/:id          # Update reading progress
DELETE /api/reading-list/:id          # Remove from reading list
GET    /api/reading-list/recommendations # Get genre recommendations

✍️ User Books & Creative Writing

GET    /api/user-books               # List user-created books
POST   /api/user-books               # Create new book
GET    /api/user-books/:id           # Get book details
PATCH  /api/user-books/:id           # Update book
DELETE /api/user-books/:id           # Delete book
POST   /api/user-books/:id/like      # Like/unlike book

πŸ“ Chapter Management

GET    /api/user-books/:bookId/chapters # Get book chapters
GET    /api/chapters/:id                # Get specific chapter
POST   /api/chapters                    # Create new chapter
PATCH  /api/chapters/:id                # Update chapter
DELETE /api/chapters/:id                # Delete chapter
POST   /api/chapters/:id/like           # Like/unlike chapter

πŸ’¬ Discussion Forums

GET    /api/discussions       # List discussions (with filtering)
POST   /api/discussions       # Create new discussion
GET    /api/discussions/:id   # Get specific discussion
PATCH  /api/discussions/:id   # Update discussion
DELETE /api/discussions/:id   # Delete discussion

πŸ’­ Comment System

GET    /api/comments/:discussionId # Get discussion comments
POST   /api/comments               # Create comment
PATCH  /api/comments/:id           # Update comment
DELETE /api/comments/:id           # Delete comment

πŸ“ Literary Blogging

GET    /api/blogs            # List blogs (with filtering)
POST   /api/blogs            # Create new blog
GET    /api/blogs/:id        # Get specific blog
PATCH  /api/blogs/:id        # Update blog
DELETE /api/blogs/:id        # Delete blog

πŸ›‘οΈ Content Reporting & Moderation

POST /api/reports            # Submit content report
GET  /api/reports/my-reports # Get user's submitted reports

πŸ“‹ API Response Format

All API responses follow this consistent structure:

{
  "success": true,
  "message": "Operation completed successfully",
  "data": {
    // Response data here
  }
}

πŸ”’ Authentication & Security

  • Firebase JWT Tokens: Secure authentication with Google Integration
  • Protected Routes: All user-specific endpoints require authentication
  • Data Validation: Comprehensive input validation and sanitization
  • Privacy Controls: User-defined visibility settings for all content
  • Content Moderation: Built-in reporting and flagging system

πŸ§ͺ Testing

Run Backend Tests

cd code/boibritto-server
npm test

Test Coverage

Our comprehensive test suite covers:

  • Unit Tests: Model validation and utility functions
  • Integration Tests: API endpoint functionality
  • Authentication Tests: Firebase token verification
  • Database Tests: CRUD operations and data integrity
  • Feature Tests: Collections, reading lists, blogs, discussions, and user books

Available Test Suites

# Run all tests
npm test

# Run specific test files
npm test blog.test.mjs
npm test collections.test.mjs
npm test readingList.test.mjs
npm test discussion.test.mjs
npm test comment.test.mjs
npm test userBook.test.mjs
npm test chapter.test.mjs

πŸš€ Deployment

Backend Deployment

The backend is configured for deployment on platforms like Vercel, Railway, or any Node.js hosting service.

# Build for production
npm run build

# Start production server
npm start

Frontend Deployment

The Next.js frontend can be deployed on Vercel, Netlify, or any static hosting service.

# Build for production
npm run build

# Start production server
npm start

Environment Configuration

Ensure all environment variables are properly configured in your deployment platform:

  • Database connection strings
  • Firebase configuration
  • API keys and secrets
  • CORS settings for production domains

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Firebase for robust authentication services
  • MongoDB for flexible data storage
  • Google Books API for comprehensive book data
  • Next.js for powerful React framework capabilities
  • TailwindCSS for beautiful, responsive design
  • AdminJS for comprehensive backend administration
  • The open-source community for amazing tools and libraries

πŸ“ž Contact & Links

πŸš€ Project Resources

API Documentation GitHub Issues


πŸ‘₯ Meet the Development Team

Four passionate developers combining literature with cutting-edge technology

Raiyan Muhtasim

Raiyan Muhtasim

Full-Stack Developer & Backend Lead

GitHub LinkedIn

Abdullah Al Musaddiq Rafi

Abdullah Al Musaddiq Rafi

Full-Stack Developer & Frontend Lead

GitHub LinkedIn

Mahbub Rahman

Md. Mahbub Ur Rahman

Backend Developer & AI Enthusiast

GitHub LinkedIn

Team Member 4

Hasibul Karim

Frontend Developer

GitHub LinkedIn


Built with ❀️ for book lovers, readers, and literary communities

"Connecting readers, inspiring writers, building communities"

Made with Love Literary Platform


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •