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
- β 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)
- Backend: Flask (Python), Flask-Login, Flask-SQLAlchemy
- Frontend: HTML5, CSS3, Bootstrap (optional), Jinja2
- Database: SQLite
- Deployment: Render.com
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
- Clone the repository
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name- Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows- Install dependencies
pip install -r requirements.txt- 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- Run the Flask app
python app.pyThen open http://127.0.0.1:5000 in your browser.
- Username:
admin - Note: First create the admin user manually or register as
admin.
You may also move secrets to an .env file:
SECRET_KEY=ab#1867$@817
DATABASE_URL=sqlite:///database.dbThen load them in app.py using python-dotenv.
| Login Page | Dashboard | Admin Panel |
|---|---|---|
![]() |
![]() |
![]() |
(Add screenshots to docs/screenshots/ folder and update above)
| 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) |
- 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.
Feel free to open issues or pull requests for improvements.
Built by Lovnish Verma Deployment: https://nielitchandigarhaiml.onrender.com
This project is open-source and free to use under the MIT License.


