Skip to main content

Command Palette

Search for a command to run...

Code Submit Platform: A Full-Stack Solution for Seamless Code Submission

Updated
โ€ข6 min readโ€ขView as Markdown
K

๐Ÿš€ Cloud | DevOps | Scripting Enthusiast Hi, Iโ€™m Kamlesh Parihar โ€” a passionate DevOps learner and tech blogger who thrives on solving problems with automation, cloud-native tools, and clean code. I write about AWS, CI/CD, Docker, Kubernetes, Python scripting, and anything that simplifies development and operations. ๐Ÿง  Sharing insights, tutorials, and real-world project experiences to help others grow in their DevOps journey. ๐Ÿ“š Lifelong learner. Open-source supporter. Tech community advocate. โœ๏ธ Follow along as I break down complex DevOps concepts into simple, actionable posts.


Managing code submissions efficiently is essential for students, developers, and educators. To address this need, I built the Code Submit Platform, a full-stack Vue 3 + Nuxt 3 + Firebase application designed for programming challenge submissions. This platform combines real-time code execution, multi-language support, admin management, and a modern UI to create a seamless experience for both users and administrators.

In this blog, Iโ€™ll cover the project structure, tasks, features, tech stack, setup, and usage.

๐Ÿ“Œ Project Overview

The Code Submit Platform allows users to:

  • Sign in securely via Google Authentication

  • Submit code in multiple languages (Python, C++, Java, JavaScript)

  • Test code in real-time against multiple test cases

  • Track submission history with pass/fail feedback

  • For admins: manage users, monitor submissions, and view platform statistics

The platform emphasizes security, responsive design, and real-time updates, making it ideal for coding competitions, online classrooms, or personal practice projects.


โœจ Key Features

๐Ÿ” Authentication System

  • Google Sign-In via Firebase Auth

  • Role-Based Access Control (Users vs Admins)

  • Persistent login with real-time auth state updates

๐Ÿ–ฅ Enhanced Programming Challenge System

  • Multi-language code editor with syntax highlighting

  • Pre-built code templates for each language

  • Real-time test case validation with visual pass/fail indicators

  • Live updates for submitted code and test results

๐ŸŽจ Modern UI/UX

  • Dark/Light mode with smooth animated transitions

  • Glassmorphism effects for a modern design

  • Responsive mobile-first interface using Tailwind CSS

  • Custom animations and interactive components

๐Ÿ›ก Admin Dashboard

  • Real-time statistics: total submissions, active users, daily activity

  • Submission management with search and filtering

  • User management: dynamically add/remove admin privileges

  • Admin-only access to platform tools

๐Ÿ”’ Security & Privacy

  • User isolation: users see only their own submissions

  • Middleware and Firebase Security Rules for protected routes

  • Secure admin access and role-based verification

๐Ÿ— Project Structure

code-submit-platform/
โ”œโ”€โ”€ ๐Ÿ“ฆ assets/
โ”‚ โ””โ”€โ”€ css/
โ”‚ โ”œโ”€โ”€ main.css # Global styles and base imports
โ”‚ โ””โ”€โ”€ tailwind.css # Custom animations and Tailwind styles
โ”œโ”€โ”€ ๐Ÿงฉ components/
โ”‚ โ”œโ”€โ”€ AdminManagement.vue # Admin user management interface
โ”‚ โ”œโ”€โ”€ AppHeader.vue # Universal header with profile dropdown
โ”‚ โ”œโ”€โ”€ AppNavigation.vue # Navigation component
โ”‚ โ”œโ”€โ”€ CodeEditor.vue # CodeMirror-based code editor
โ”‚ โ””โ”€โ”€ LoginForm.vue # Authentication form component
โ”œโ”€โ”€ ๐Ÿ”„ composables/
โ”‚ โ”œโ”€โ”€ useStore.ts # Store utilities and helpers
โ”‚ โ””โ”€โ”€ useTheme.js # Theme management composable
โ”œโ”€โ”€ ๐Ÿ—๏ธ layouts/
โ”‚ โ””โ”€โ”€ default.vue # Main app layout with navigation
โ”œโ”€โ”€ ๐Ÿ›ก๏ธ middleware/
โ”‚ โ”œโ”€โ”€ admin.ts # Admin route protection
โ”‚ โ”œโ”€โ”€ auth.js # Authentication middleware
โ”‚ โ”œโ”€โ”€ auth.ts # TypeScript auth middleware
โ”‚ โ””โ”€โ”€ guest.ts # Guest-only route protection
โ”œโ”€โ”€ ๐Ÿ“„ pages/
โ”‚ โ”œโ”€โ”€ admin/
โ”‚ โ”‚ โ””โ”€โ”€ index.vue # Admin dashboard
โ”‚ โ”œโ”€โ”€ challenge.vue # Multi-language coding interface
โ”‚ โ”œโ”€โ”€ index.vue # Landing page with authentication
โ”‚ โ””โ”€โ”€ login.vue # Login page
โ”œโ”€โ”€ ๐Ÿ”Œ plugins/
โ”‚ โ””โ”€โ”€ firebase.client.js # Firebase configuration and initialization
โ”œโ”€โ”€ ๐Ÿ—„๏ธ stores/
โ”‚ โ”œโ”€โ”€ admin.ts # Admin management store
โ”‚ โ”œโ”€โ”€ auth.ts # Authentication and user management
โ”‚ โ””โ”€โ”€ submissions.ts # Submission handling and statistics
โ”œโ”€โ”€ ๐ŸŒ public/
โ”‚ โ”œโ”€โ”€ favicon.ico # Site favicon
โ”‚ โ””โ”€โ”€ robots.txt # SEO robots configuration
โ”œโ”€โ”€ โš™๏ธ Configuration Files
โ”‚ โ”œโ”€โ”€ .env # Environment variables (not in git)
โ”‚ โ”œโ”€โ”€ .firebaserc # Firebase project configuration
โ”‚ โ”œโ”€โ”€ .gitignore # Git ignore rules
โ”‚ โ”œโ”€โ”€ app.vue # Root Vue component
โ”‚ โ”œโ”€โ”€ firebase.json # Firebase hosting/functions config
โ”‚ โ”œโ”€โ”€ firestore.rules # Firebase security rules
โ”‚ โ”œโ”€โ”€ nuxt.config.ts # Nuxt configuration with Tailwind
โ”‚ โ”œโ”€โ”€ package.json # Dependencies and scripts
โ”‚ โ”œโ”€โ”€ package-lock.json # Locked dependency versions
โ”‚ โ””โ”€โ”€ tsconfig.json # TypeScript configuration
โ””โ”€โ”€ ๐Ÿ“š README.md # This comprehensive guide

๐Ÿ›  Tech Stack

Frontend:

  • Vue 3 + Composition API

  • Nuxt 3 for full-stack SSR capabilities

  • TypeScript for type-safe development

  • Tailwind CSS for responsive and modern styling

Backend & Database:

  • Firebase Firestore: real-time NoSQL database

  • Firebase Auth: Google OAuth for authentication

  • Firebase Security Rules: role-based access control

State Management:

  • Pinia stores with TypeScript support

  • Composables for reusable logic

Development Tools:

  • ESLint for code consistency

  • Hot Module Replacement for fast development

  • Environment variables for secure configuration


๐Ÿ“ Tasks Implemented

  1. Authentication
  • Google OAuth sign-in

  • Persistent login with real-time state tracking

  • Admin and user role management

Code Submission & Testing

  • Multi-language code editor using CodeMirror

  • Live test cases and feedback system

  • Submission storage in Firestore with timestamps

Admin Dashboard

  • View and filter user submissions

  • Manage admin privileges

  • Real-time platform statistics

UI/UX Enhancements

  • Dark/Light mode toggle

  • Glassmorphism and custom animations

  • Responsive layout for desktop and mobile

Security & Privacy

  • User-only data access

  • Middleware route protection

  • Firebase Security Rules enforcement


๐ŸŽฏ Setup & Deployment

Prerequisites:

  • Node.js 18+ and npm/yarn

  • Firebase Project with Firestore and Authentication

  • Google OAuth credentials

Installation:

git clone https://github.com/pariharkamal9829/code-submit-platform.git
cd code-submit-platform
npm install

Firebase Configuration:
Create a .env file with your Firebase keys:

NUXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NUXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NUXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NUXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NUXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NUXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NUXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id

Firebase Setup

Enable Authentication:

  1. Go to Firebase Console โ†’ Authentication โ†’ Sign-in method

  2. Enable Google Sign-in provider

  3. Add your domain to Authorized domains

Setup Firestore:

  1. Create Firestore database in production mode

  2. Deploy the security rules from firestore-rules.txt

Deploy Security Rules:

# Install Firebase CLI
npm install -g firebase-tools
# Login and initialize
firebase login
firebase init firestore
# Deploy rules
firebase deploy --only firestore:rules

Development:

npm run dev       # Start dev server
npm run build     # Build for production
npm run preview   # Preview production build

Deployment Options: Netlify (recommended), Vercel, Firebase Hosting


๐Ÿ‘จโ€๐Ÿ’ป Usage Guide

For Regular Users:

  1. ๐Ÿ” Sign In: Use Google account to authenticate securely

  2. ๐Ÿ“ Choose Language: Select from Python, C++, Java, or JavaScript

  3. ๐Ÿ’ป Write Code: Use the professional code editor with syntax highlighting

  4. ๐Ÿงช Test Code: Run test cases to validate your solution

  5. ๐Ÿ“ค Submit: Submit your solution and see real-time feedback

  6. ๐Ÿ“Š Track Progress: View your personal submission history and test results

For Administrators:

  1. ๐Ÿ”ง Dashboard Access: Navigate to /admin (protected route)

  2. ๐Ÿ“ˆ View Statistics: Monitor platform usage and user engagement

  3. ๐Ÿ‘ฅ Review Submissions: Browse all user submissions with advanced search

  4. โš™๏ธ Manage Admins: Add/remove administrator privileges

  5. ๐Ÿ“‹ Export Data: Analyze submission patterns and user behavior


๐Ÿ”ฎ Future Enhancements

  • Support multiple challenges per user

  • Automated testing with unit tests

  • Leaderboards and performance tracking

  • Code review and scoring system

  • Offline PWA capabilities


๐Ÿ“„ License & Contribution

This project is MIT licensed. Contributions are welcome:

  1. Fork the repository

  2. Create a feature branch

  3. Commit changes with clear messages

  4. Open a Pull Request


๐Ÿ‘จโ€๐Ÿ’ป Author

Kamlesh Parihar
GitHub: @pariharkamal9829
Project: Code Submit Platform