Skip to content

VastSea is a comprehensive coding community platform that empowers developers to share, discover, and solve programming problems across multiple programming languages. A beautiful responsive UI built with Next.js 15 and TailwindCSS.

Notifications You must be signed in to change notification settings

SagarSuryakantWaghmare/vastsea

Repository files navigation

🌊 VastSea

A modern platform for sharing programming problems and solutions in multiple languages

VastSea is a comprehensive coding community platform built with Next.js 15, designed to help developers share, discover, and solve programming problems across multiple programming languages. Whether you're a beginner looking to learn or an expert wanting to contribute, VastSea provides an intuitive and beautiful interface for collaborative programming.

Next.js TypeScript MongoDB TailwindCSS

πŸ“Έ Screenshots

Landing Page

The beautiful homepage featuring a modern gradient design, featured problems, and multi-language support showcase.

Landing Page

Light Theme

Clean and modern light theme interface showing the platform's responsive design and intuitive navigation.

Light Theme

User Registration

Streamlined signup process with form validation, password visibility toggle, and user-friendly error handling.

Sign Up

Problems Gallery

Browse through coding problems with advanced filtering, search functionality, and organized card layout.

Problems

Problem Details

Detailed problem view with syntax-highlighted code solutions in multiple programming languages.

View Problem

Add New Problem

Intuitive interface for contributors to add new coding problems with rich text editor and multi-language code input.

Add Problem

Admin Dashboard

Comprehensive admin panel for user management, problem moderation, and platform analytics.

Admin Panel

✨ Features

πŸ” Authentication & User Management

  • Secure Authentication: Built with NextAuth.js for robust user authentication
  • User Registration: Easy signup process with email verification
  • Password Security: Bcrypt encryption with secure password policies
  • User Profiles: Customizable user profiles with activity tracking
  • Admin Panel: Comprehensive admin dashboard for user and content management

🧩 Problem Management

  • Multi-Language Support: Code solutions in Java, C, C++, and JavaScript
  • Rich Text Editor: Create detailed problem descriptions with formatting
  • Code Syntax Highlighting: Beautiful code display using Highlight.js
  • Tag System: Organize problems with customizable tags
  • Search & Filter: Advanced filtering by language, difficulty, and tags
  • CRUD Operations: Full create, read, update, delete functionality

πŸ† Community Features

  • Leaderboard: Track top contributors based on problem submissions
  • User Dashboard: Personal dashboard showing user's contributions and statistics
  • Problem Statistics: View contribution counts and user rankings
  • Real-time Updates: Live updates using modern React patterns

🎨 User Experience

  • Responsive Design: Fully mobile-optimized interface
  • Dark/Light Theme: Toggle between themes with persistent preference
  • Smooth Animations: Framer Motion animations for enhanced UX
  • Modern UI Components: Built with Radix UI and shadcn/ui
  • Toast Notifications: Real-time feedback using Sonner
  • Loading States: Elegant loading indicators and skeleton screens

πŸ”§ Technical Features

  • Server-Side Rendering: Optimized performance with Next.js App Router
  • Database Integration: MongoDB with Mongoose ODM
  • Type Safety: Full TypeScript implementation
  • Form Validation: Zod schema validation with React Hook Form
  • Error Handling: Comprehensive error handling and user feedback
  • SEO Optimized: Meta tags and structured data

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 15 with App Router
  • Language: TypeScript 5.2.2
  • Styling: TailwindCSS 3.3.3
  • UI Components: Radix UI + shadcn/ui
  • Animations: Framer Motion 11.0.8
  • Forms: React Hook Form + Zod validation
  • Icons: Lucide React + React Icons

Backend

  • Runtime: Node.js with Next.js API Routes
  • Database: MongoDB 6.16.0
  • ODM: Mongoose 8.2.2
  • Authentication: NextAuth.js 4.24.7
  • Password Hashing: bcryptjs 2.4.3
  • Validation: Zod 3.23.8

Development

  • Package Manager: npm
  • Development Server: Next.js Dev Server
  • Environment: Node.js 20+
  • Deployment: Vercel (recommended)

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB database (Atlas or local)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/SagarSuryakantWaghmare/vastsea.git
    cd vastsea
  2. Install dependencies

    npm install
  3. Set up environment variables

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

    # MongoDB Connection
    MONGODB_URI=mongodb+srv://username:[email protected]/vastsea?retryWrites=true&w=majority
    
    # NextAuth Configuration
    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=your-secret-key-here
    
    # Admin Configuration
    [email protected],[email protected]
    [email protected],[email protected]
  4. Start the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

πŸ“ Project Structure

vastsea/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/                   # Authentication routes
β”‚   β”‚   β”œβ”€β”€ signin/               # Sign in page
β”‚   β”‚   └── signup/               # Sign up page
β”‚   β”œβ”€β”€ admin/                    # Admin dashboard
β”‚   β”œβ”€β”€ api/                      # API routes
β”‚   β”‚   β”œβ”€β”€ auth/                 # Authentication APIs
β”‚   β”‚   β”œβ”€β”€ admin/                # Admin APIs
β”‚   β”‚   β”œβ”€β”€ problems/             # Problem APIs
β”‚   β”‚   └── leaderboard/          # Leaderboard API
β”‚   β”œβ”€β”€ dashboard/                # User dashboard
β”‚   β”œβ”€β”€ leaderboard/              # Community leaderboard
β”‚   β”œβ”€β”€ problems/                 # Problem pages
β”‚   β”‚   └── [id]/                 # Dynamic problem pages
β”‚   β”œβ”€β”€ about/                    # About page
β”‚   β”œβ”€β”€ privacy/                  # Privacy policy
β”‚   β”œβ”€β”€ terms/                    # Terms of service
β”‚   β”œβ”€β”€ layout.tsx                # Root layout
β”‚   β”œβ”€β”€ page.tsx                  # Home page
β”‚   └── globals.css               # Global styles
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ ui/                       # shadcn/ui components
β”‚   β”œβ”€β”€ CodeBlock.tsx             # Code syntax highlighting
β”‚   β”œβ”€β”€ CodeEditor.tsx            # Code editor component
β”‚   β”œβ”€β”€ Footer.tsx                # Site footer
β”‚   β”œβ”€β”€ Navbar.tsx                # Navigation bar
β”‚   β”œβ”€β”€ ProblemCard.tsx           # Problem display card
β”‚   └── ...                       # Other components
β”œβ”€β”€ lib/                          # Utilities and configurations
β”‚   β”œβ”€β”€ db/                       # Database configuration
β”‚   β”‚   β”œβ”€β”€ models/               # Mongoose models
β”‚   β”‚   └── mongodb.ts            # MongoDB connection
β”‚   β”œβ”€β”€ auth-options.ts           # NextAuth configuration
β”‚   β”œβ”€β”€ admin-utils.ts            # Admin utilities
β”‚   └── utils.ts                  # General utilities
β”œβ”€β”€ hooks/                        # Custom React hooks
β”œβ”€β”€ types/                        # TypeScript type definitions
β”œβ”€β”€ public/                       # Static assets
└── middleware.ts                 # Next.js middleware

πŸ—„οΈ Database Schema

User Model

{
  name: String,           // User's display name
  email: String,          // Unique email address
  password: String,       // Hashed password
  role: String,           // 'user' | 'admin' | 'moderator'
  createdAt: Date,        // Account creation date
  updatedAt: Date         // Last profile update
}

Problem Model

{
  title: String,          // Problem title
  description: String,    // Problem description
  codes: {               // Code solutions
    java: String,        // Java solution
    c: String,           // C solution
    cpp: String,         // C++ solution
    js: String           // JavaScript solution
  },
  tags: [String],        // Problem tags
  author: ObjectId,      // Reference to User
  createdAt: Date,       // Creation timestamp
  updatedAt: Date        // Last update timestamp
}

🎯 Key Features Explained

Authentication Flow

  • Users can register with email and password
  • Secure password hashing using bcryptjs
  • JWT-based session management via NextAuth.js
  • Role-based access control (Admin/User)
  • Automatic redirection based on user role

Problem Management

  • Rich text editor for problem descriptions
  • Multi-language code editor with syntax highlighting
  • Tag-based categorization system
  • Advanced search and filtering capabilities
  • Admin approval workflow for new problems

Admin Dashboard

  • User management (view, edit, delete users)
  • Problem moderation (approve, edit, delete problems)
  • System statistics and analytics
  • Bulk operations for content management

Leaderboard System

  • Real-time ranking based on problem contributions
  • Medal system for top 3 contributors
  • User statistics and achievement tracking
  • Responsive design for mobile and desktop

πŸš€ Deployment

Vercel Deployment (Recommended)

  1. Connect your repository to Vercel

    npm i -g vercel
    vercel
  2. Set environment variables in Vercel dashboard

    • Add all variables from .env.local
    • Ensure MongoDB URI points to production database
  3. Deploy

    vercel --prod

Alternative Deployment Options

  • Netlify: Compatible with Next.js
  • Railway: Easy database and app deployment
  • DigitalOcean App Platform: Full-stack deployment
  • AWS: Using AWS Amplify or EC2

πŸ”§ Development

Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run build:clean  # Clean build (Unix)
npm run build:clean:win # Clean build (Windows)

Development Workflow

  1. Create feature branch: git checkout -b feature/your-feature
  2. Make changes and test locally
  3. Run linting: npm run lint
  4. Commit changes: git commit -m "Add feature"
  5. Push and create pull request

Code Style

  • ESLint: Configured for Next.js and TypeScript
  • Prettier: Code formatting (recommended)
  • TypeScript: Strict mode enabled
  • Naming: camelCase for variables, PascalCase for components

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Ways to Contribute

  • πŸ› Report bugs and issues
  • πŸ’‘ Suggest new features
  • πŸ“ Improve documentation
  • πŸ”§ Submit code improvements
  • 🎨 Enhance UI/UX design

Contribution Guidelines

  1. Fork the repository
  2. Create a feature branch
  3. Follow the existing code style
  4. Add tests for new features
  5. Update documentation as needed
  6. Submit a pull request

Code of Conduct

  • Be respectful and inclusive
  • Provide constructive feedback
  • Help others learn and grow
  • Follow project guidelines

πŸ“„ License

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

πŸ‘¨β€πŸ’» Author

Sagar Suryakant Waghmare

πŸ™ Acknowledgments

  • Next.js Team - For the amazing React framework
  • Vercel - For seamless deployment platform
  • Radix UI - For accessible UI primitives
  • shadcn/ui - For beautiful component library
  • MongoDB - For flexible document database
  • Community Contributors - For feedback and contributions

πŸ”— Links


Made with ❀️ by Sagar Waghmare

If you found this project helpful, please consider giving it a ⭐️!

About

VastSea is a comprehensive coding community platform that empowers developers to share, discover, and solve programming problems across multiple programming languages. A beautiful responsive UI built with Next.js 15 and TailwindCSS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages