A modern, secure web application for managing and organizing educational resources like books, modules, tests, and previous year questions (PYQs).
- 📚 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
- 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
- Node.js 18+
- pnpm (recommended) or npm
- PostgreSQL database
- Clone the repository:
git clone https://github.com/a3ro-dev/bookiebear.git
cd bookiebear- Install dependencies:
pnpm install- Set up environment variables:
Create a
.envfile in the root directory:
DATABASE_URL="your_postgresql_connection_string"
ADMIN_USERNAME="your_admin_username"
ADMIN_PASSWORD="your_secure_admin_password"- 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- Run the development server:
pnpm devOpen http://localhost:3000 in your browser.
# 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:seedThis 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
├── 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
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.
DATABASE_URL: PostgreSQL connection stringADMIN_USERNAME: Admin panel usernameADMIN_PASSWORD: Strong password for admin accessNODE_ENV: Set to "production" for production builds
This app can be deployed on:
- Vercel (recommended for Next.js)
- Netlify
- Railway
- AWS/GCP/Azure
Make sure to:
- Set all required environment variables
- Configure your database
- Run database migrations
- Test the admin panel functionality
If you need help or have questions:
- Check the existing issues
- Create a new issue with detailed information
- Provide steps to reproduce any problems