Skip to content

a3ro-dev/bookiebear

Repository files navigation

Bookiebear - Educational Resource Manager

A modern, secure web application for managing and organizing educational resources like books, modules, tests, and previous year questions (PYQs).

Features

  • 📚 Resource Management: Organize books by categories (Physics, Chemistry, Biology, Mathematics, etc.)
  • 🔍 Smart Search: Filter and search through resources
  • 📱 Responsive Design: Works seamlessly on desktop and mobile devices
  • 🔒 Secure Admin Panel: Protected admin interface for content management
  • 🎯 Category-based Organization: Support for different resource types and subcategories
  • Fast Performance: Built with Next.js and modern web technologies

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • Styling: Tailwind CSS, Framer Motion
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: Secure session-based auth
  • UI Components: Radix UI primitives

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • PostgreSQL database

Installation

  1. Clone the repository:
git clone https://github.com/a3ro-dev/bookiebear.git
cd bookiebear
  1. Install dependencies:
pnpm install
  1. Set up environment variables: Create a .env file in the root directory:
DATABASE_URL="your_postgresql_connection_string"
ADMIN_USERNAME="your_admin_username"
ADMIN_PASSWORD="your_secure_admin_password"
  1. Set up the database:
# Generate database schema
pnpm db:generate

# Push schema to database
pnpm db:push

# Seed the database with sample data (optional)
pnpm db:seed
  1. Run the development server:
pnpm dev

Open http://localhost:3000 in your browser.

Database Management

# Generate new migrations
pnpm db:generate

# Push schema changes
pnpm db:push

# Open Drizzle Studio (database GUI)
pnpm db:studio

# Seed database with sample data
pnpm db:seed

Security Features

This application implements several security best practices:

  • Environment-based Configuration: All sensitive data is stored in environment variables
  • Secure Authentication: Session-based auth with secure cookies
  • Input Validation: All user inputs are validated and sanitized
  • Security Headers: Comprehensive security headers via middleware
  • SQL Injection Prevention: Using parameterized queries with Drizzle ORM
  • Rate Limiting: Basic rate limiting for API endpoints
  • CSRF Protection: Built-in Next.js CSRF protection

Project Structure

├── app/                    # Next.js app router
│   ├── api/               # API routes
│   ├── admin/             # Admin panel
│   ├── [category]/        # Dynamic category pages
│   └── ...
├── components/            # Reusable UI components
├── lib/                   # Utilities and configurations
│   ├── db.ts             # Database connection
│   ├── schema.ts         # Database schema
│   └── auth.ts           # Authentication utilities
├── data/                  # Static data files
├── public/               # Static assets
└── scripts/              # Database scripts

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Security

This application has been thoroughly reviewed for security vulnerabilities. If you discover any security issues, please report them responsibly by emailing akshatsingh14372@outlook.com rather than opening a public issue.

Deployment

Environment Variables Required for Production:

  • DATABASE_URL: PostgreSQL connection string
  • ADMIN_USERNAME: Admin panel username
  • ADMIN_PASSWORD: Strong password for admin access
  • NODE_ENV: Set to "production" for production builds

Deployment Platforms:

This app can be deployed on:

  • Vercel (recommended for Next.js)
  • Netlify
  • Railway
  • AWS/GCP/Azure

Make sure to:

  1. Set all required environment variables
  2. Configure your database
  3. Run database migrations
  4. Test the admin panel functionality

Support

If you need help or have questions:

  • Check the existing issues
  • Create a new issue with detailed information
  • Provide steps to reproduce any problems

About

A modern, secure web application for managing and organizing educational resources like books, modules, tests, and previous year questions (PYQs).

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors