Skip to content

Rylorx/LeetTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Tracker

A simple and lightweight LeetCode tracking application designed to help you stay organized, motivated, and consistent in your problem-solving journey. This project provides an easy way to record the problems you’ve solved, how you solved them, and any notes or strategies you want to remember for future review.


🚀 Features

  • Track solved problems with problem name, difficulty, tags, and date solved
  • Store solution notes so you remember how you solved each question
  • Browse, review, and filter completed problems
  • Simple, clean interface for adding and viewing entries
  • Lightweight backend (Node.js + SQLite)
  • Minimal frontend using vanilla HTML/CSS

📁 Project Structure

DATABASE-FINAL-PROJECT-FOLDER/ │ ├── .venv/
├── backend/
│ ├── app.js
│ ├── db.sql
│ ├── package.json
│ ├── package-lock.json
│ └── node_modules/
│ └── public/
├── index.html
├── create_post.html
├── post_detail.html
├── posts.html
├── signup.html
└── styles.css


🛠️ Tech Stack

Backend

  • Node.js
  • Express.js
  • MySQL (via XAMPP)

Frontend

  • HTML
  • CSS

📦 Installation & Setup

1. Clone the Repository

git clone https://github.com/YOUR_USERNAME/leetcode-tracker.git
cd leetcode-tracker

2. Set Up MySQL Database (XAMPP)

  1. Install and start XAMPP
  2. Start Apache and MySQL services in XAMPP Control Panel
  3. Open phpMyAdmin (http://localhost/phpmyadmin)
  4. Create a new database named leetcode_posts
  5. Import the schema:
    • Click on the leetcode_posts database
    • Go to the SQL tab
    • Copy and paste the contents of backend/db.sql
    • Click "Go" to execute

3. Install Backend Dependencies

cd backend npm install

4. Start the Backend Server

cd backend node app.js

The server runs at:

http://localhost:3000

5. Access the Application

Once the backend server is running, open your browser and go to:

http://localhost:3000

The Express server automatically serves the frontend files from the public folder. No need for a separate frontend server!


🔧 Troubleshooting

Error: ECONNREFUSED ::1:3306 or ECONNREFUSED 127.0.0.1:3306

This means MySQL isn't running. To fix:

  1. Open XAMPP Control Panel
  2. Click "Start" next to MySQL (it should turn green)
  3. Also start Apache if you want to use phpMyAdmin
  4. Verify MySQL shows "Running" status
  5. Try running node app.js again

If MySQL won't start:

  • Check for port conflicts (another program using port 3306)
  • Stop any other MySQL services in Windows Services
  • In XAMPP, click Config → my.ini and verify port is 3306

✨ Usage

  1. Open the homepage to view all tracked problems
  2. Add a new problem using Create Problem
  3. Enter:
    • Title
    • Difficulty
    • Tags
    • Solution explanation
  4. Save and revisit at any time for review

🧩 Why I Built This

LeetCode progress is easier when you can see what you've solved, how you solved it, and what patterns you've learned. This tool provides a clean, simple way to organize that information without clutter.


📌 Future Improvements

  • Search/filtering
  • Difficulty sorting
  • Progress dashboard
  • Authentication
  • Cloud database option

⚠️ Security Notice

This project is for educational/demonstration purposes only.

Current security limitations:

  • Passwords are stored in plain text (no hashing/encryption)
  • Database credentials are hardcoded (not using environment variables)
  • No input validation or sanitization
  • No protection against SQL injection or XSS attacks

Do NOT use this in production or with real user data.

For production use, you would need to implement:

  • Password hashing (bcrypt)
  • Environment variables for credentials
  • Input validation and sanitization
  • Parameterized queries (already partially implemented)
  • HTTPS/SSL encryption
  • Session management and CSRF protection

🤝 Contributions

Feel free to fork the repo and submit pull requests.


📄 License

MIT License


About

This was a simple project I built a while ago to help me practice Leetcode problems and track how I solved them to help me become a better programmer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors