A modern web application built with Next.js, TypeScript, and Firebase that allows students to connect their coding profiles and showcase their skills across multiple platforms.
- User Authentication: Secure signup/login with Firebase Auth
- Multi-Platform Integration: Connect LeetCode, Codeforces, AtCoder, and GitHub accounts
- Real-time Stats: Fetch and display coding statistics from all platforms
- Beautiful Dashboard: Modern UI with tabs for different platforms
- Sync Functionality: Update stats with a single click
- Responsive Design: Works perfectly on desktop and mobile
- Frontend: Next.js 14 (App Router), TypeScript, TailwindCSS
- UI Components: shadcn/ui
- Authentication: Firebase Auth
- Database: Firestore
- Form Handling: React Hook Form with Zod validation
- Icons: Lucide React
- Notifications: Sonner
-
Clone the repository
git clone <repository-url> cd codehub
-
Install dependencies
npm install
-
Set up Firebase
- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Create a Firestore database
- Get your Firebase configuration
-
Environment Variables Create a
.env.localfile in the root directory:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
-
Run the development server
npm run dev
Open http://localhost:3000 to view the app.
- Go to Firebase Console
- Create a new project or select an existing one
- Navigate to Authentication > Sign-in method
- Enable "Email/Password" authentication
- Go to Firestore Database and create a database
- Set up security rules for your Firestore database:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}- Sign Up: Create an account with your email and password
- Add Handles: Enter your handles for LeetCode, Codeforces, AtCoder, and GitHub
- View Dashboard: Check your coding stats across all platforms
- Sync Stats: Click "Sync Now" to update your latest statistics
The app uses shadcn/ui components for a consistent and modern design:
- Cards: Display user information and stats
- Forms: Handle user input with validation
- Tabs: Organize different platform statistics
- Buttons: Interactive elements with loading states
- Avatars: User profile pictures
- Toast: Notifications for user actions
- Firebase Authentication handles user security
- Firestore security rules ensure users can only access their own data
- Environment variables keep sensitive configuration secure
The application is fully responsive and works seamlessly across:
- Desktop computers
- Tablets
- Mobile phones
The app can be deployed on Vercel, Netlify, or any platform that supports Next.js:
-
Vercel (Recommended):
npm install -g vercel vercel
-
Build for production:
npm run build npm start
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues or have questions, please open an issue on the GitHub repository.
Happy Coding! 🎉