Graph Marks is a lightweight automation tool that tracks test scores, generates performance graphs, and sends analysis directly to Telegram.
🌐 Live Demo: https://graphmarks.onrender.com
Note: This is a demo deployment of the repository, so some random or test entries may appear in the database.
Graph Marks is a small automation tool designed to help students track and analyze their test performance over time.
It automatically:
- stores test scores
- generates visual graphs of performance
- calculates improvements between tests
- sends summaries directly to Telegram
This allows quick feedback after every test without manually analyzing marks.
- Frontend Framework : HTML, CSS, JavaScript
- Backend Framework: Flask
- Charts: Matplotlib, Numpy, Pandas
- Database: SQL
- Backend: Python3
- Messaging: Telegram Bot API ( Telethon )
- Deployment: Render
The two main capabilities of this tool are:
The results are received in my Telegram inbox in seconds
- Intuitive interface
- Score tracking
- Graph visualization
- Versatile comparisons for scores
- Telegram notifications
- Individual and cumulative statistics sent to Telegram inbox
- Responsive website
This project is deployed using Render
Render is connected directly to this GitHub repository.
The hosted version can reflect any stable commit.
A principle emphasized in the Google IT Automation course on Coursera is that automation should ideally justify itself in terms of time saved versus time invested.
This automation took approximately 3 hours 15 minutes to develop.
3.25 hours × 60 minutes = 195 minutes
The automation replaces two manual tasks per month, each of which previously required 15 minutes.
2 tasks × 15 minutes = 30 minutes saved per month
195 minutes ÷ 30 minutes/month ≈ 6.5 months
Based on this calculation, it would take approximately 6.5 months for the time saved by the automation to exceed the time spent building it.
However, the benefit is not purely numerical.
Because the automation significantly reduces the effort required, it increases the likelihood that the task will actually be completed regularly, making the workflow easier and more consistent.
⚠️ Note on Local InstallationThis project was primarily developed and tested in a deployed environment, and local installation was not the primary development workflow.
As a result, some parts of the setup — particularly around secret files and environment configuration — may require minor debugging depending on your system.The installation steps below were generated with the assistance of Windsurf to provide a structured setup guide. They accurately reflect the project configuration, but if you encounter issues during local setup, please feel free to open an issue in the repository.
git clone https://github.com/gupteAarya/GraphMarks.git
cd GraphMarkspython -m venv venv
# On Windows:
# venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash- Go to https://my.telegram.org
- Sign in with your phone number
- Go to "API development tools"
- Create a new application
- Copy the
api_idandapi_hashvalues to your.envfile
python app.pyThe app will start on http://localhost:4000
- The first time you run the app, you'll be prompted to enter your phone number
- Enter the verification code you receive on Telegram
- The app will remember your session for future runs
git add .
git commit -m "Ready for deployment"
git push origin main- Sign up at https://render.com
- Connect your GitHub account
- Click "New" → "Web Service"
- Select your repository from GitHub
- Configure the service:
- Name: marktrack (or your preferred name)
- Region: Choose nearest to your users
- Branch: main
- Runtime: Python 3
- Build Command:
pip install -r requirements.txt - Start Command:
python app.py
In your Render dashboard, add these environment variables:
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
PORT=4000
Create a render.yaml file in your repository root:
services:
- type: web
name: marktrack
env: python
buildCommand: pip install -r requirements.txt
startCommand: python app.py
envVars:
- key: PYTHON_VERSION
value: 3.9.0
- key: PORT
value: 4000In the secret files section, create a file called data.db
Click "Create Web Service" and Render will:
- Clone your repository
- Install dependencies
- Start the application
- Provide a public URL
If you encounter session-related errors:
# Delete existing session files
rm session.session*The app will create data.db automatically. Ensure write permissions in the deployment directory.
To fix matplotlib font warnings:
# Install additional fonts (optional)
sudo apt-get install fonts-dejavu-core # On Ubuntu/DebianThe app is configured to bind to 0.0.0.0 and use the PORT environment variable, which is standard for cloud deployments.
API_ID: Telegram API ID (required)API_HASH: Telegram API hash (required)PORT: Application port (defaults to 4000)
GraphMarks/
├── app.py # Main Flask application
├── df_manager.py # Database operations
├── analysis_manager.py # Graph generation and analysis
├── requirements.txt # Python dependencies
├── .env # Environment variables (create this)
├── .gitignore # Git ignore rules
├── templates/ # HTML templates
│ ├── index.html # Main form page
│ ├── sent.html # Success page
│ └── view.html # Data visualization page
├── static/ # Generated graphs
│ ├── marks_ADV.png
│ ├── marks_JEM.png
│ ├── marks_PAT.png
│ ├── marks_line.png
│ └── markslogo.png
└── data.db # SQLite database (auto-created)
This project was primarily built as a quick automation tool to solve a specific workflow problem. While it currently fulfills its intended purpose, several improvements could be explored if the project were expanded further:
-
Improved local setup support
Streamline the installation process and eliminate manual debugging steps, particularly around secret files and environment configuration. -
More robust error handling
Add clearer logging and exception handling for Telegram API interactions and database operations. -
Configuration management
Replace manual environment variable setup with a more structured configuration system. -
Better deployment automation
Introduce CI/CD pipelines for automated testing and deployment validation. -
User interface improvements
Expand the UI to make the tool easier to use without manual configuration.
For now, the project remains a lightweight automation utility, and further development would depend on future use cases or feature requests.
This project is licensed under the MIT License. See the LICENSE file for details.





