A modern, mobile-first educational platform celebrating Nigerian cultural heritage through interactive quizzes and community-contributed content.
- Chapter-based navigation with progress tracking
- Multiple question types: Multiple choice, true/false, short answer
- AI-powered adaptive difficulty that adjusts to user performance
- Real-time feedback with detailed explanations
- Comprehensive analytics and performance insights
- Cross-device progress persistence
- Offline capability for mobile users
- Image gallery with responsive grid/list views
- Upload system with drag-and-drop interface and UploadThing integration
- Cloud storage with CDN optimization
- Advanced search & filtering by region, date, views, and keywords
- Download & sharing capabilities with usage analytics
- Metadata extraction and management
- Complete API routes for CRUD operations
- Email/password authentication with secure registration
- OAuth integration (Google, GitHub)
- Comprehensive profile management dashboard
- Session management with security best practices
- Rate limiting and CSRF protection
- Account lockout protection
- Email verification and password reset flows
- Responsive design optimized for all device sizes
- Nigerian cultural aesthetics with custom design system
- WCAG 2.1 accessibility compliance
- Progressive Web App features
- Touch-optimized interactions
- Performance-optimized animations
- Next.js 15 with React 18
- TypeScript for type safety
- Prisma ORM with PostgreSQL
- Redis caching for performance
- Comprehensive middleware for security and rate limiting
- 3G network optimization
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Shadcn UI - High-quality component library
- Framer Motion - Smooth animations
- SWR - Data fetching and caching
- Next.js API Routes - Server-side logic
- Prisma ORM - Database operations
- PostgreSQL - Primary database
- Redis - Caching and session storage
- NextAuth.js - Authentication
- UploadThing - File upload and storage
- Vercel - Deployment platform
- Vercel Postgres - Managed database
- Vercel Redis - Managed cache
- UploadThing - File storage and CDN
- Node.js 18+ and pnpm
- PostgreSQL database
- Redis instance (optional, for caching)
- Clone the repository
git clone https://github.com/your-username/naija-facts.git
cd naija-facts- Install dependencies
pnpm install- Set up environment variables
cp .env.example .env.localConfigure the following required variables:
# Database
DATABASE_URL="postgresql://..."
# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
# OAuth Providers (optional)
GITHUB_ID="your-github-app-id"
GITHUB_SECRET="your-github-app-secret"
# File Upload
UPLOADTHING_SECRET="your-uploadthing-secret"
UPLOADTHING_APP_ID="your-uploadthing-app-id"
# Redis (optional, for caching)
REDIS_URL="redis://..."- Set up the database
pnpm db:push
pnpm db:seed- Start the development server
pnpm devVisit http://localhost:3000 to see the application.
naija-facts/
βββ app/ # Next.js 15 App Router
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ cultural-content/ # Cultural gallery
β βββ profile/ # User profile management
β βββ quiz/ # Quiz system
βββ components/ # Reusable UI components
β βββ ui/ # Shadcn UI components
β βββ auth/ # Authentication components
β βββ sections/ # Page-specific sections
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and configurations
β βββ auth/ # Authentication utilities
β βββ database/ # Database queries
β βββ upload/ # File upload utilities
βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
βββ styles/ # Global styles
βββ types/ # TypeScript type definitions
# Run unit tests
pnpm test
# Run integration tests
pnpm test:integration
# Run E2E tests
pnpm test:e2e
# Type checking
pnpm type-check
# Linting
pnpm lintThe project uses Prisma with PostgreSQL. Key models include:
- Profile - User accounts and profile information
- Quiz - Quiz definitions and metadata
- Question - Quiz questions with multiple types
- UserProgress - Progress tracking and analytics
- CulturalImage - Cultural content management
- Achievement - Gamification system
# Generate Prisma client
pnpm db:generate
# Push schema changes
pnpm db:push
# Run migrations
pnpm db:migrate
# Seed the database
pnpm db:seed
# Reset database
pnpm db:reset- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Type checking
- Husky - Git hooks
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run linter
pnpm type-check # TypeScript checking
pnpm db:studio # Open Prisma Studio- Connect your repository to Vercel
- Configure environment variables in the Vercel dashboard
- Deploy - Vercel will automatically build and deploy
Ensure all required environment variables are set:
- Database connection strings
- Authentication secrets
- File upload configurations
- Redis connection (optional)
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Implement proper error handling
- Add tests for new features
- Follow the existing project structure
- Project foundation and infrastructure
- Database schema and models
- Complete authentication system
- Adaptive quiz system
- Cultural content management
- Mobile-first responsive design
- Performance optimization
- Gamification system
- Internationalization (i18n)
- AI integration for enhanced learning
- Admin dashboard
- Content seeding
- Multi-language support (6 languages)
- Advanced analytics dashboard
- Social features and sharing
- Offline-first capabilities
- Mobile app versions
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.naijafacts.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Nigerian cultural heritage communities
- Open source contributors
- Educational technology advocates
- The Next.js and React communities
Built with β€οΈ for Nigerian education and cultural preservation