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.
The beautiful homepage featuring a modern gradient design, featured problems, and multi-language support showcase.
Clean and modern light theme interface showing the platform's responsive design and intuitive navigation.
Streamlined signup process with form validation, password visibility toggle, and user-friendly error handling.
Browse through coding problems with advanced filtering, search functionality, and organized card layout.
Detailed problem view with syntax-highlighted code solutions in multiple programming languages.
Intuitive interface for contributors to add new coding problems with rich text editor and multi-language code input.
Comprehensive admin panel for user management, problem moderation, and platform analytics.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Package Manager: npm
- Development Server: Next.js Dev Server
- Environment: Node.js 20+
- Deployment: Vercel (recommended)
- Node.js 18+
- MongoDB database (Atlas or local)
- Git
-
Clone the repository
git clone https://github.com/SagarSuryakantWaghmare/vastsea.git cd vastsea
-
Install dependencies
npm install
-
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]
-
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
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
{
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
}
{
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
}
- 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
- 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
- User management (view, edit, delete users)
- Problem moderation (approve, edit, delete problems)
- System statistics and analytics
- Bulk operations for content management
- Real-time ranking based on problem contributions
- Medal system for top 3 contributors
- User statistics and achievement tracking
- Responsive design for mobile and desktop
-
Connect your repository to Vercel
npm i -g vercel vercel
-
Set environment variables in Vercel dashboard
- Add all variables from
.env.local
- Ensure MongoDB URI points to production database
- Add all variables from
-
Deploy
vercel --prod
- Netlify: Compatible with Next.js
- Railway: Easy database and app deployment
- DigitalOcean App Platform: Full-stack deployment
- AWS: Using AWS Amplify or EC2
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)
- Create feature branch:
git checkout -b feature/your-feature
- Make changes and test locally
- Run linting:
npm run lint
- Commit changes:
git commit -m "Add feature"
- Push and create pull request
- ESLint: Configured for Next.js and TypeScript
- Prettier: Code formatting (recommended)
- TypeScript: Strict mode enabled
- Naming: camelCase for variables, PascalCase for components
We welcome contributions from the community! Here's how you can help:
- π Report bugs and issues
- π‘ Suggest new features
- π Improve documentation
- π§ Submit code improvements
- π¨ Enhance UI/UX design
- Fork the repository
- Create a feature branch
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Submit a pull request
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Follow project guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
Sagar Suryakant Waghmare
- GitHub: @SagarSuryakantWaghmare
- LinkedIn: Sagar Waghmare
- Email: [email protected]
- 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
- Live Demo: VastSea Platform
- Documentation: Project Wiki
- Issue Tracker: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ by Sagar Waghmare
If you found this project helpful, please consider giving it a βοΈ!