Skip to content

A full-featured Flask web application with user registration, login/logout, admin panel, topic management system, and session-based visitor tracking. The admin can manage users and upload AI/ML-related topics with images and PDF links.

Notifications You must be signed in to change notification settings

lovnishverma/nielitchandigarhaiml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ“š AI-ML Topics Management Portal (Flask-Based)

A full-featured Flask web application with user registration, login/logout, admin panel, topic management system, and session-based visitor tracking. The admin can manage users and upload AI/ML-related topics with images and PDF links.

πŸ”— Live URL: https://nielitchandigarhaiml.onrender.com


✨ Features

  • βœ… User Registration & Login (with hashed passwords)
  • πŸ”’ Role-Based Access (admin panel)
  • 🧠 AI/ML Topics Listing (image + name + description + PDF)
  • βž• Add/Edit/Delete Topics (admin only)
  • πŸ“ˆ Visitor Counter (session-aware)
  • πŸ“… Indian Timezone Timestamp with greeting
  • πŸ‘₯ Admin can list and delete users (except self)
  • 🧰 SQLite Database Integration
  • πŸ“„ Clean and modern templated UI (using Jinja2 templates)

πŸ—οΈ Tech Stack

  • Backend: Flask (Python), Flask-Login, Flask-SQLAlchemy
  • Frontend: HTML5, CSS3, Bootstrap (optional), Jinja2
  • Database: SQLite
  • Deployment: Render.com

πŸ—‚οΈ Project Structure


project/
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ login.html
β”‚   β”œβ”€β”€ register.html
β”‚   β”œβ”€β”€ main.html
β”‚   β”œβ”€β”€ user\_list.html
β”‚   β”œβ”€β”€ admin\_panel.html
β”‚   β”œβ”€β”€ add\_topic.html
β”‚   β”œβ”€β”€ modify\_topic.html
β”‚   β”œβ”€β”€ list\_topics.html
β”‚
β”œβ”€β”€ static/
β”‚   └── (CSS/JS/Images - optional)
β”‚
β”œβ”€β”€ visitor\_count.txt
β”œβ”€β”€ database.db
β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
└── README.md


πŸš€ Installation Guide

  1. Clone the repository
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
  1. Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate     # Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Create database and visitor file
# Create SQLite database
python
>>> from app import db
>>> db.create_all()
>>> exit()

# Create visitor counter file
echo "0" > visitor_count.txt
  1. Run the Flask app
python app.py

Then open http://127.0.0.1:5000 in your browser.


πŸ”‘ Admin Access

  • Username: admin
  • Note: First create the admin user manually or register as admin.

πŸ“ Environment Variables (optional)

You may also move secrets to an .env file:

SECRET_KEY=ab#1867$@817
DATABASE_URL=sqlite:///database.db

Then load them in app.py using python-dotenv.


πŸ“Έ Screenshots

Login Page Dashboard Admin Panel
Login Dashboard Admin

(Add screenshots to docs/screenshots/ folder and update above)


πŸ§ͺ Routes Overview

Route Method Description
/login GET/POST Login form
/register GET/POST Register new user
/logout GET Logout current user
/ GET Dashboard (requires login)
/admin GET Admin home panel
/admin/add_topic GET/POST Add new topic
/admin/list_topics GET List all topics
/admin/modify_topic/<id> GET/POST Edit topic
/admin/delete_topic/<id> POST Delete topic
/users GET List all users (admin only)
/delete_user/<id> POST Delete user (admin only)

πŸ›‘οΈ Security Notes

  • Passwords are securely hashed using Werkzeug.
  • Only authenticated users can access the dashboard.
  • Admin-specific routes are protected by username checks.
  • Users can't delete themselves.

πŸ“¬ Contact / Contribution

Feel free to open issues or pull requests for improvements.

Built by Lovnish Verma Deployment: https://nielitchandigarhaiml.onrender.com


πŸ“ƒ License

This project is open-source and free to use under the MIT License.


About

A full-featured Flask web application with user registration, login/logout, admin panel, topic management system, and session-based visitor tracking. The admin can manage users and upload AI/ML-related topics with images and PDF links.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published