Skip to content

awesome-pro/upscprep-next-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UPSCprep Frontend 🎯

Screenshot 2025-09-11 at 7 44 59β€―AM Screenshot 2025-09-11 at 7 55 38β€―AM 1 Screenshot 2025-09-11 at 7 55 38β€―AM upsc-1 upsc-2 upsc-0

Next.js TypeScript Tailwind CSS License: MIT

A modern, enterprise-grade learning management system for UPSC exam preparation

πŸ“‹ Table of Contents

🎯 Overview

UPSCprep is a comprehensive, full-stack learning management system specifically designed for Union Public Service Commission (UPSC) exam aspirants in India. This repository contains the frontend application built with modern web technologies, offering a seamless and engaging user experience.

🌟 Why UPSCprep?

  • Real-time Excellence: WebSocket-powered mock tests with synchronised timers
  • Security First: JWT-based authentication with role-based access control
  • Modern Architecture: Built on Next.js 15 with React Server Components
  • Scalable Design: Feature-driven architecture ready for enterprise scale

✨ Features

πŸ” Authentication & Security

  • JWT-based Authentication - Stateless, secure user sessions
  • Role-Based Access Control - Dynamic UI adaptation for different user roles (Student, Teacher & Admin)
  • Protected Routes - Secure access to premium content

πŸ§ͺ Real-Time Mock Tests

  • WebSocket Integration - Live, synchronized exam experience
  • Server-Side Timing - Tamper-proof test sessions
  • Instant Feedback - Real-time response submission and validation

πŸ’³ Payment Integration

  • Razorpay Integration - Secure subscription management
  • Multiple Payment Methods - Cards, UPI, net banking support
  • Subscription Tracking - Automated renewal and billing management

πŸ“ Document Management

  • AWS S3 Integration - Scalable file storage and retrieval
  • Secure Uploads - Protected document handling
  • Study Material Library - Organized resource management

πŸ“Š Analytics Dashboard

  • Progress Tracking - Comprehensive performance metrics
  • Test Analytics - Detailed score analysis and improvement suggestions
  • Study Statistics - Time management and learning insights

πŸ› οΈ Tech Stack

Core Technologies

Technology Version Purpose
Next.js 15.x React framework with App Router
React 19.x Front-end ibrary with modern hooks
TypeScript 5.x Type-safe development
Tailwind CSS 3.x Utility-first CSS framework

UI & Design

Technology Purpose
Shadcn/ui Headless, accessible components
Lucide Icons Modern icon system
Framer Motion Smooth animations and transitions

Development & Build Tools

Technology Purpose
pnpm Fast, efficient package manager
ESLint Code linting and formatting
Prettier Code style consistency

Integration & Services

Service Purpose
WebSocket Real-time communication
Razorpay Payment processing
AWS S3 File storage
JWT Authentication tokens

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository

    git clone https://github.com/awesome-pro/upscprep-next-frontend.git
    cd upscprep-next-frontend
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env.local

    Edit .env.local with your configuration values (see Environment Variables)

  4. Start the development server

    pnpm dev
  5. Open your browser

    Navigate to http://localhost:3000

Docker Setup (Optional)

For containerized development:

# Build the image
docker build -t upscprep-frontend .

# Run the container
docker run -p 3000:3000 upscprep-frontend

πŸ“ Project Structure

upscprep-frontend/
β”œβ”€β”€ πŸ“ app/                    # Next.js App Router (routes & pages)
β”‚   β”œβ”€β”€ πŸ“ (auth)/            # Authentication routes
β”‚   β”œβ”€β”€ πŸ“ dashboard/         # Dashboard pages
β”‚   β”œβ”€β”€ πŸ“ tests/             # Test-related pages
β”‚   └── πŸ“ api/               # API routes
β”œβ”€β”€ πŸ“ components/            # Reusable UI components
β”‚   β”œβ”€β”€ πŸ“ ui/                # Shadcn/ui components
β”‚   β”œβ”€β”€ πŸ“ forms/             # Form components
β”‚   └── πŸ“ layouts/           # Layout components
β”œβ”€β”€ πŸ“ contexts/              # React Context providers
β”œβ”€β”€ πŸ“ hooks/                 # Custom React hooks
β”œβ”€β”€ πŸ“ lib/                   # Utility functions & configs
β”œβ”€β”€ πŸ“ providers/             # App-level providers
β”œβ”€β”€ πŸ“ services/              # API service layer
β”œβ”€β”€ πŸ“ stores/                # State management
β”œβ”€β”€ πŸ“ types/                 # TypeScript type definitions
β”œβ”€β”€ πŸ“ public/                # Static assets
β”œβ”€β”€ πŸ“ styles/                # Global styles
└── πŸ“„ package.json           # Dependencies & scripts

Key Directories Explained

  • app/: Contains all application routes using Next.js 15 App Router
  • components/: Reusable UI components following atomic design principles
  • services/: API abstraction layer for clean data fetching
  • hooks/: Custom React hooks for shared logic
  • lib/: Utility functions, helpers, and third-party configurations

πŸ”§ Environment Variables

Create a .env.local file in the root directory:

# API Configuration
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000/api
NEXT_PUBLIC_WEBSOCKET_URL=ws://localhost:8000/ws

# Razorpay Configuration
NEXT_PUBLIC_RAZORPAY_KEY_ID=your_razorpay_key_id

# AWS S3 Configuration (if handling client-side uploads)
NEXT_PUBLIC_AWS_REGION=your_aws_region
NEXT_PUBLIC_S3_BUCKET_NAME=your_s3_bucket

# Application Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=UPSCprep

# Analytics (Optional)
NEXT_PUBLIC_GA_ID=your_google_analytics_id

πŸ“ Scripts

Script Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint
pnpm lint:fix Fix ESLint issues
pnpm type-check Run TypeScript checks
pnpm format Format code with Prettier

πŸ§ͺ Testing

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

πŸš€ Deployment

Vercel (Recommended)

  1. Connect your repository to Vercel
  2. Configure environment variables
  3. Deploy automatically on push to main

Docker Production

# Build production image
docker build -t upscprep-frontend:prod .

# Run production container
docker run -p 3000:3000 upscprep-frontend:prod

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: pnpm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

πŸ“„ License

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


Built with ❀️ by the UPSCprep Team

Website β€’ GitHub β€’ Issues

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages