Skip to content

Latest commit

ย 

History

30 Commits

Folders and files

Repository files navigation

๐Ÿ› Debugg

Learn to code by fixing real, broken code.

The Duolingo of programming, built for people who want to think like developers.

๐Ÿš€ Live Demo ยท Report a Bug ยท Request a Feature

React TypeScript Firebase Render

Debugg landing page

๐Ÿ“– Table of Contents


๐Ÿ’ก About

Most coding platforms ask you to write code from a blank screen. But in real jobs, developers spend most of their time reading and fixing code that already exists.

Debugg is an interactive debugging practice platform that helps developers improve their problem-solving skills by identifying and fixing bugs in existing code. Users can explore programming challenges, track their progress, earn XP, and participate in community discussions. Instead of focusing only on writing code from scratch, Debugg encourages learners to develop the debugging skills used in real-world software development.


โœจ Features

Feature Description
๐Ÿ› Debug Real Code Fix actual buggy snippets in JavaScript, Python, Java, HTML and more
๐ŸŽฎ Levels & XP Move through difficulty tiers, unlock new challenges, earn XP per fix
๐Ÿ“… Daily Challenge A fresh timed challenge every day with a live countdown
๐Ÿ† Leaderboard Compete globally, ranked by XP
๐Ÿ… Profile & Badges Track your stats and collect badges as you improve
๐Ÿ’ฌ Community Post questions, share tips, comment and like
๐Ÿ“ User-Submitted Challenges Upload your own challenges for the community
๐Ÿ› ๏ธ Dev Dashboard Review, approve or reject submissions and publish them as live challenges
๐ŸŒ— Light / Dark Mode Full theme toggle across the whole app
๐Ÿ” Authentication Email/password and Google sign-in via Firebase Auth
โ˜๏ธ Realtime Data Challenges, users, posts and submissions live in Cloud Firestore

๐Ÿ–ฅ๏ธ Screenshots

1. Dashboard

Dashboard
2. Challenge (Debug View)

Challenge page
3. Leaderboard

Leaderboard
4. Community

Community

5. Levels

Levels

---

๐Ÿ”„ How It Works

Pick a language  โ†’  Choose a level  โ†’  Read the buggy code  โ†’  Select the faulty line
        โ†’  Apply your fix  โ†’  Run it  โ†’  Submit  โ†’  Earn XP, badges & leaderboard rank
  1. Choose a language, topic and difficulty on the Levels page (or take the Daily Challenge).
  2. Spot the bug by selecting the faulty line in the debug view.
  3. Fix it, run the code, and submit.
  4. Level up โ€” correct fixes award XP, unlock harder challenges, and move you up the leaderboard.

๐Ÿงฐ Tech Stack

Layer Technology
Frontend React + TypeScript (functional components & hooks)
Styling Custom CSS with Nunito, Fredoka One and JetBrains Mono (Google Fonts)
Auth Firebase Authentication (Email/Password, Google OAuth via signInWithPopup)
Database Cloud Firestore
Backend Firebase Cloud Functions (/functions)
Hosting Render

๐Ÿš€ Getting Started

Prerequisites

  • Node.js v16 or higher
  • npm or yarn
  • A Firebase project with Authentication and Firestore enabled

1. Clone the repository

git clone https://github.com/dharmikadyuti/Debugg---Learning-App.git
cd Debugg---Learning-App

2. Install dependencies

npm install

3. Set up Firebase

  1. Create a project in the Firebase Console.
  2. Register a Web App and copy its Firebase configuration.
  3. Enable Email/Password and Google sign-in under Authentication.
  4. Create a Cloud Firestore database.

Configure your Firebase credentials using the method expected by the application. If using Vite environment variables, define the required VITE_FIREBASE_* variables in your local environment and your deployment provider.

Never commit private service-account credentials or environment files containing secrets.

Then create a .env.local file in the project root:

# Replace the prefix if your setup uses a different one (e.g. VITE_)
REACT_APP_FIREBASE_API_KEY=your_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
REACT_APP_FIREBASE_APP_ID=your_app_id

Your Firebase initialization (src/firebase.ts) reads from these values:

import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";

const firebaseConfig = {
  apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
  authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
  projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
  storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
  messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID,
  appId: process.env.REACT_APP_FIREBASE_APP_ID,
};

const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const db = getFirestore(app);

โš ๏ธ Never commit .env.local. It is already covered by .gitignore.

4. Deploy Firestore security rules (optional but recommended)

npm install -g firebase-tools
firebase login
firebase deploy --only firestore:rules

5. Run the app

npm start

The app will be available at http://localhost:3000.


๐Ÿ“ Project Structure

Debugg---Learning-App/
โ”œโ”€โ”€ public/                 # Static assets
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ App.tsx             # Main app and page components
โ”‚   โ”œโ”€โ”€ firebase.ts         # Firebase initialization
โ”‚   โ”œโ”€โ”€ styles.css          # Global styles
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ functions/              # Firebase Cloud Functions
โ”œโ”€โ”€ docs/images/            # README screenshots
โ”œโ”€โ”€ firebase.json           # Firebase project configuration
โ”œโ”€โ”€ firestore.rules         # Firestore security rules
โ”œโ”€โ”€ .firebaserc             # Firebase project alias
โ”œโ”€โ”€ .eslintrc.json          # ESLint configuration
โ”œโ”€โ”€ tsconfig.json           # TypeScript configuration
โ””โ”€โ”€ package.json

๐Ÿ—บ๏ธ App Pages

Page Description
Landing Hero page with feature highlights and stats
Auth Email/password and Google login & sign-up
Dashboard Overview of available challenges with filters
Levels Language โ†’ topic โ†’ difficulty selection with unlockable levels
Challenge Interactive debug view: select the buggy line, apply a fix, run, submit
Daily Challenge Timed challenge with a countdown to the next one
Leaderboard Global XP rankings
Discuss Community feed: post, comment, like
Profile Stats, badges, and a form to submit your own challenge
Dev Dashboard Review and publish community-submitted challenges

๐Ÿ—„๏ธ Data Model

Debugg stores its data in these Firestore collections:

Collection Purpose
users Profiles, XP, badges, progress
challenges Published debugging challenges
posts Community posts, comments and likes
submissions User-submitted challenges awaiting review

โ˜๏ธ Deployment

The live app is hosted on Render: debugg-learning-app-po2u.onrender.com

To deploy your own copy:

  1. Push the repo to GitHub.
  2. Create a new Static Site on Render and connect the repo.
  3. Set the build command to npm run build and the publish directory to build.
  4. Add your Firebase environment variables in Render's dashboard.
  5. In Firebase Console โ†’ Authentication โ†’ Settings โ†’ Authorized domains, add your Render domain so Google sign-in works.

The free Render tier may spin down when idle, so the first load can take a few seconds.


๐Ÿ›ฃ๏ธ Roadmap

  • Multi-language debugging challenges
  • XP, levels and global leaderboard
  • Daily challenge with countdown
  • Community discussion feed
  • User-submitted challenges with a moderation dashboard
  • Light / dark theme
  • Support for more programming languages
  • Streaks and achievement milestones
  • More advanced debugging challenges
  • Personalized challenge recommendations based on performance
  • Automated challenge validation
  • Unit and end-to-end tests

๐Ÿค Contributing

Contributions are welcome, whether it's a new challenge, a bug fix, or a feature idea.

  1. Fork the project
  2. Create your branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m "Add amazing feature"
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

You can also open an issue to discuss ideas first.


๐Ÿ“„ License

No license has been added yet. Consider adding one (for example MIT) so others know how they can use this project.


๐Ÿ‘ค Author

Dharmika Dyuti GitHub: @dharmikadyuti

If you like Debugg, give it a โญ โ€” it really helps!

Releases

Packages

Contributors

Languages