Skip to content

About

An automation setup to speed up my test score analysis

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Graph Marks

Graph Marks is a lightweight automation tool that tracks test scores, generates performance graphs, and sends analysis directly to Telegram.

Version Build License

🌐 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.

About the Project

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.

Group 175

💻 Tech Stack

  • Frontend Framework : HTML, CSS, JavaScript
  • Backend Framework: Flask
  • Charts: Matplotlib, Numpy, Pandas
  • Database: SQL
  • Backend: Python3
  • Messaging: Telegram Bot API ( Telethon )
  • Deployment: Render

📝 How it works

The two main capabilities of this tool are:

Having your marks plotted on a graph, calculating the improvements and sending it all to your Telegram inbox Viewing a detailed analysis page where I can compare my past test scores with my current ones
Screen Recording 2026-03-06 at 09 09 12 Screen Recording 2026-03-06 at 09 10 51

The results are received in my Telegram inbox in seconds

Group 48-1

⭐ Features

  • Intuitive interface
  • Score tracking
  • Graph visualization
  • Versatile comparisons for scores
  • Telegram notifications
  • Individual and cumulative statistics sent to Telegram inbox
  • Responsive website

🚀 Deployment

Deployment Platform

Render Dashboard

This project is deployed using Render

Continuous Build Status

Render is connected directly to this GitHub repository.

The hosted version can reflect any stable commit.

📈 Benefits of This Automation

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.

Development Cost

This automation took approximately 3 hours 15 minutes to develop.

3.25 hours × 60 minutes = 195 minutes

Time Saved Per Month

The automation replaces two manual tasks per month, each of which previously required 15 minutes.

2 tasks × 15 minutes = 30 minutes saved per month

Break-even Analysis

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.

Practical Benefit

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.

Local Installation

⚠️ Note on Local Installation

This 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.

1. Clone the Repository

git clone https://github.com/gupteAarya/GraphMarks.git
cd GraphMarks

2. Create Virtual Environment

python -m venv venv
# On Windows:
# venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Set Up Environment Variables

Create a .env file in the project root:

API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash

5. Get Telegram API Credentials

  1. Go to https://my.telegram.org
  2. Sign in with your phone number
  3. Go to "API development tools"
  4. Create a new application
  5. Copy the api_id and api_hash values to your .env file

6. Run the Application

python app.py

The app will start on http://localhost:4000

7. First-Time Setup

  • 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

Deployment on Render

1. Prepare Your Repository

git add .
git commit -m "Ready for deployment"
git push origin main

2. Create Render Account

  1. Sign up at https://render.com
  2. Connect your GitHub account

3. Create New Web Service

  1. Click "New" → "Web Service"
  2. Select your repository from GitHub
  3. 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

4. Set Environment Variables

In your Render dashboard, add these environment variables:

API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
PORT=4000

5. Advanced Configuration (Optional)

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: 4000

6. Secret Files

In the secret files section, create a file called data.db

(Optional) Directly create a .env file and add your Environment Variables there

7. Deploy

Click "Create Web Service" and Render will:

  1. Clone your repository
  2. Install dependencies
  3. Start the application
  4. Provide a public URL

Troubleshooting

Common Issues

1. Telegram Session Errors

If you encounter session-related errors:

# Delete existing session files
rm session.session*

2. Database Permission Issues

The app will create data.db automatically. Ensure write permissions in the deployment directory.

3. Font Warnings (Optional)

To fix matplotlib font warnings:

# Install additional fonts (optional)
sudo apt-get install fonts-dejavu-core  # On Ubuntu/Debian

4. Port Binding

The app is configured to bind to 0.0.0.0 and use the PORT environment variable, which is standard for cloud deployments.

Environment Variables Reference

  • API_ID: Telegram API ID (required)
  • API_HASH: Telegram API hash (required)
  • PORT: Application port (defaults to 4000)

Demo Screenshots

Demo Screenshots


Home Page


Analysis Page


Message Status Page

Project structure

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)

Future Improvements

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An automation setup to speed up my test score analysis

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages