Skip to content

REVANTSINGH01/Code-Alert

Repository files navigation

🚀 CodeAlert

Competitive Programming Tracker & Contest Reminder

CodeAlert is a full-stack mobile application built to centralize competitive programming activities across multiple coding platforms.

Track ratings, solved questions, upcoming contests, and reminders — all from one dashboard.


📌 Features

✅ User Authentication (Signup/Login)

✅ JWT Session Management

✅ Platform Handle Integration

✅ Contest Tracking

✅ Contest Countdown Timer

✅ Coding Profile Monitoring

✅ Theme Support (Dark / Light)


🏗️ High Level Design (HLD)

System Overview

                    ┌────────────────────┐
                    │    Flutter App     │
                    │--------------------│
                    │ Login / Signup     │
                    │ Dashboard          │
                    │ Profile            │
                    │ Contest Feed       │
                    │ Reminders          │
                    └─────────┬──────────┘
                              │
                         REST APIs
                              │
                              ▼

                  ┌────────────────────┐
                  │   FastAPI Backend   │
                  │---------------------│
                  │ Authentication      │
                  │ Dashboard Sync      │
                  │ Contest Aggregator  │
                  │ Reminder Service    │
                  └─────────┬───────────┘
                            │
        ┌───────────────────┼───────────────────┐
        ▼                   ▼                   ▼

 ┌──────────────┐  ┌──────────────┐  ┌──────────────┐
 │ MongoDB      │  │ LeetCode API │  │ Codeforces   │
 │ User Data    │  │ GraphQL      │  │ Public API   │
 │ Profiles     │  │              │  │              │
 │ Contests     │  └──────────────┘  └──────────────┘
 │ Reminders    │
 └──────────────┘

⚙️ Low Level Design (LLD)

Frontend Structure

lib/
│
├── pages/
│   ├── login_page.dart
│   ├── signup_page.dart
│   ├── home_page.dart
│   ├── profile_page.dart
│   ├── platform_detail.dart
│   ├── reminder_page.dart
│   └── settings.dart
│
├── services/
│   └── api_service.dart
│
├── provider/
│   └── theme_provider.dart
│
└── main.dart

Backend Structure

backend/
│
├── app/
│
├── routers/
│   ├── users.py
│   ├── dashboard.py
│   ├── contests.py
│   ├── leetcode.py
│   ├── codeforces.py
│   ├── reminders.py
│
├── auth/
│   └── auth_handler.py
│
├── database/
│   └── database.py
│
└── main.py

🧩 System Architecture

User Authentication Flow

User
↓

Flutter Login

↓

POST /login

↓

JWT Generated

↓

Store SharedPreferences

↓

Navigate Home

Dashboard Sync Flow

Profile Open

↓

syncDashboard()

↓

Verify Token

↓

Fetch Platform Data

↓

Update MongoDB

↓

Return Dashboard

↓

Refresh UI

Contest Flow

Open Home

↓

GET /contests

↓

Contest Service

↓

Contest Cards

↓

Live Countdown

🗄️ Database Schemas

users

{
 "_id":"ObjectId",
 "name":"Revant",
 "email":"user@gmail.com",
 "password":"****",
 "handles":{
   "cf_handle":"abc",
   "lc_handle":"xyz"
 }
}

lc_profile

{
"user_id":"123",
"rating":1824,
"global_ranking":40000,
"problems_solved":745
}

cf_profile

{
"user_id":"123",
"rating":1487
}

contests

{
"name":"Weekly Contest",
"platform":"LeetCode",
"start_time":"timestamp"
}

reminders

{
"user_id":"123",
"contest_name":"Codeforces Round",
"time":"timestamp"
}

🔌 API Endpoints

Auth

POST /signup
POST /login

User

PUT /users/handles
POST /dashboard/sync

Contest

GET /contests

Reminder

POST /reminder
GET /reminders/{id}

🛠️ Tech Stack

Frontend

Flutter Dart Provider SharedPreferences

Backend

FastAPI JWT Async REST_API

Database

MongoDB


External APIs

  • LeetCode GraphQL
  • Codeforces API
  • CodeChef Data Source

📈 Current Progress

Completed

  • Authentication
  • JWT Login
  • Contest Fetch
  • Contest Countdown
  • Profile Page
  • Platform Handle Setup
  • Dashboard Sync
  • Rating Tracking
  • Questions Solved Tracking
  • Theme Support
  • Auto Refresh

In Progress

  • Notification Integration
  • Profile Analytics
  • Contest Filtering
  • Better Error Handling
  • Background Sync

Planned

  • Push Notifications
  • Leaderboards
  • AI Contest Recommendation
  • Statistics Dashboard
  • Activity Graph
  • Multi-device Sync

🚀 Installation

git clone <repo>

cd codealert

flutter pub get

flutter run

Backend:

cd backend

uvicorn app.main:app --host 0.0.0.0 --reload

👨‍💻 Contributors

Built with ❤️ using Flutter + FastAPI + MongoDB

About

A Flutter-based mobile application that provides real-time coding problem alerts from platforms like LeetCode and Codeforces, with personalized filtering options.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors