Skip to content

TechBeme/Cursos-HMT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Cursos-HMT

Professional Course and Student Management System

Flask Python SQLAlchemy SQLite License

FeaturesQuick StartInstallationConfigurationLicense

Languages: 🇧🇷 Português🇪🇸 Español


📋 Table of Contents


🎯 Overview

Cursos-HMT is a professional web-based course and student management system built with Flask. It provides a robust platform for educational institutions to manage courses, student enrollments, and user accounts with a modern, secure, and intuitive interface.

Key Capabilities:

  • 🔐 Secure user authentication and authorization
  • 📚 Course creation and management
  • 👥 Student enrollment tracking (matricula system)
  • 🎨 Modern responsive UI with dark/light mode support
  • 🔒 Encrypted data handling with Fernet cryptography
  • 💾 SQLite database with SQLAlchemy ORM
  • ⚡ Fast caching with Flask-Caching

👨‍💻 About the Developer

Developed by Rafael Vieira (TechBeme)

GitHub Fiverr Upwork Email

Full-Stack Developer & AI Automation Specialist

Specialized in web scraping, automation systems, modern web applications, and AI integrations.

💼 Core Expertise

  • 🔍 Web Scraping & Data Extraction
  • ⚡ Process Automation & Workflows
  • 💻 Full-Stack Development (Next.js, React, Python, TypeScript)
  • 🤖 AI Integrations (OpenAI, Anthropic, RAG systems)
  • 📊 Database Design & Optimization
  • 🎨 Modern UI/UX Development

🌍 Languages

🇺🇸 English • 🇧🇷 Português • 🇪🇸 Español

📬 Contact

Email: contact@techbe.me


✨ Features

User Management

  • Secure Authentication: Login/logout with password hashing (scrypt)
  • User Registration: Self-service signup with validation
  • Profile Management: Update username, email, password, and student ID
  • Session Management: Secure session handling with Flask-Login

Course Management

  • Create Courses: Add new courses to the system
  • View All Courses: Browse available courses
  • Student Enrollment: Associate students with courses
  • Many-to-Many Relationships: Students can enroll in multiple courses

Student Management (Matricula System)

  • Unique Student IDs: Track students by their matricula (enrollment number)
  • Multi-Course Enrollment: Students can be enrolled in multiple courses
  • Duplicate Prevention: Automatic validation to prevent duplicate enrollments
  • Real-time Validation: Instant feedback on enrollment operations

Security Features

  • Password Hashing: Scrypt algorithm for secure password storage
  • Session Security: Flask-Login for session management
  • Environment Variables: Sensitive data stored in environment variables
  • Cryptography Support: Fernet encryption ready for sensitive data
  • CSRF Protection: Built-in protection against cross-site request forgery

User Interface

  • Modern Design: Clean, professional interface
  • Responsive Layout: Works on desktop, tablet, and mobile
  • Dark/Light Mode: Automatic theme switching based on user preference
  • Flash Messages: Real-time feedback for user actions
  • Intuitive Navigation: Easy-to-use interface for all operations

🛠️ Technology Stack

Backend

  • Framework: Flask 2.3.2
  • ORM: SQLAlchemy 2.0.20
  • Database: SQLite 3
  • Authentication: Flask-Login 0.6.2
  • Password Hashing: Werkzeug Security (scrypt)
  • Cryptography: Fernet encryption (cryptography 41.0.3)
  • Caching: Flask-Caching 2.0.2

Frontend

  • Template Engine: Jinja2 3.1.2
  • CSS: Custom CSS with CSS Variables
  • JavaScript: Vanilla JS for theme switching and interactions
  • Icons: Bootstrap Icons (via CDN)

Development Tools

  • WSGI Server: Gunicorn 21.2.0 (production)
  • Development Server: Flask built-in (development)

🚀 Quick Start

Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)
  • Git (optional)

Quick Installation

# Clone the repository
git clone https://github.com/yourusername/Cursos-HMT.git
cd Cursos-HMT

# Install dependencies
pip install -r requirements.txt

# Set up environment variables (see Configuration section)
export SECRET_KEY="your-secret-key-here"
export CRYPTO_KEY="your-fernet-key-here"

# Run the application
python run.py

The application will be available at http://localhost:8000


📦 Installation

Step 1: Clone the Repository

git clone https://github.com/yourusername/Cursos-HMT.git
cd Cursos-HMT

Step 2: Create Virtual Environment (Recommended)

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/MacOS
python3 -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Generate Encryption Keys

# Generate SECRET_KEY
python -c "import secrets; print(secrets.token_hex(32))"

# Generate CRYPTO_KEY (Fernet)
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

Step 5: Set Environment Variables

Windows (Command Prompt):

set SECRET_KEY=your-generated-secret-key
set CRYPTO_KEY=your-generated-crypto-key

Windows (PowerShell):

$env:SECRET_KEY="your-generated-secret-key"
$env:CRYPTO_KEY="your-generated-crypto-key"

Linux/MacOS:

export SECRET_KEY="your-generated-secret-key"
export CRYPTO_KEY="your-generated-crypto-key"

Step 6: Initialize Database

The database will be automatically created on first run.

Step 7: Run the Application

Development Mode:

python run.py

Production Mode (with Gunicorn):

gunicorn -w 4 -b 0.0.0.0:8000 run:app

Windows Production Mode:

run.bat

⚙️ Configuration

Environment Variables

The application requires the following environment variables:

Variable Description Required Example
SECRET_KEY Flask secret key for session security ✅ Yes abc123... (64 chars hex)
CRYPTO_KEY Fernet encryption key for sensitive data ✅ Yes base64-encoded-key

Permanent Configuration

Linux/MacOS (add to ~/.bashrc or ~/.zshrc):

export SECRET_KEY="your-generated-secret-key"
export CRYPTO_KEY="your-generated-crypto-key"

Windows (System Environment Variables):

  1. Search "Environment Variables" in Windows Search
  2. Click "Environment Variables"
  3. Add new User or System variables

Database Configuration

The application uses SQLite by default. The database file database.db is created automatically in the website directory.

To use a different database:

  1. Modify SQLALCHEMY_DATABASE_URI in website/init.py
  2. Install the appropriate database driver (e.g., psycopg2 for PostgreSQL)

💻 Usage

Creating an Account

  1. Navigate to http://localhost:8000
  2. Click "Sign Up"
  3. Enter your username, email, and password
  4. Submit the form

Logging In

  1. Click "Login"
  2. Enter your email and password
  3. Access the dashboard

Creating a Course

  1. Log in to your account
  2. Enter course name in the "Add Course" section
  3. Click "Add Course"

Enrolling Students

  1. Select a course from the dropdown
  2. Enter the student's matricula (enrollment number)
  3. Click "Add Student"
  4. The system automatically handles:
    • New student creation
    • Existing student enrollment
    • Duplicate prevention

Managing Your Profile

  1. Click on your username in the navigation bar
  2. Update your information:
    • Username
    • Email
    • Password
    • Matricula (student ID)
  3. Save changes

📁 Project Structure

Cursos-HMT/
├── website/                    # Main application package
│   ├── __init__.py            # App factory and configuration
│   ├── models.py              # Database models (User, Curso, Matricula)
│   ├── auth.py                # Authentication routes (login, signup, logout)
│   ├── views.py               # Main views (home, courses)
│   ├── user.py                # User management routes
│   ├── static/                # Static files
│   │   ├── css/
│   │   │   └── main.css       # Main stylesheet
│   │   └── js/
│   │       ├── main.js        # Main JavaScript
│   │       └── color-modes.js # Theme switcher
│   └── templates/             # Jinja2 templates
│       ├── base.html          # Base template
│       ├── home.html          # Dashboard
│       ├── login.html         # Login page
│       ├── signup.html        # Registration page
│       ├── profile.html       # User profile
│       ├── adduser.html       # Student enrollment
│       └── form.html          # Form components
├── run.py                     # Application entry point
├── run.bat                    # Windows batch script
├── requirements.txt           # Python dependencies
├── LICENSE                    # Proprietary license
└── README.md                  # This file

Key Files


🔒 Security

Best Practices Implemented

  • Password Hashing: Uses scrypt algorithm via Werkzeug
  • Environment Variables: Sensitive keys stored outside codebase
  • Session Security: Secure session management with Flask-Login
  • CSRF Protection: Built-in Flask protection
  • Input Validation: Form validation on both client and server side
  • Unique Constraints: Prevents duplicate users and enrollments
  • Cryptography Ready: Fernet encryption available for sensitive data

Security Recommendations

  1. Never commit sensitive keys: Always use environment variables
  2. Use HTTPS in production: Deploy behind a reverse proxy (Nginx, Apache)
  3. Regular updates: Keep dependencies updated with pip install -U -r requirements.txt
  4. Strong passwords: Enforce password policies (minimum 8 characters)
  5. Database backups: Regularly backup database.db
  6. Rate limiting: Consider adding Flask-Limiter for production

📄 License

Proprietary and Confidential

Copyright © 2026. All rights reserved.

This software and its source code are proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited.

Restrictions:

  • ❌ No commercial use
  • ❌ No modifications
  • ❌ No distribution
  • ❌ No reverse engineering
  • ❌ No sublicensing

For licensing inquiries, please contact the repository owner.

See LICENSE file for complete terms.


🚫 Disclaimer

This software is provided "as is" without warranty of any kind, express or implied. Use at your own risk.


📞 Support

For issues, questions, or support requests, please open an issue in the GitHub repository.


Developed by Rafael Vieira

GitHub Fiverr Upwork Email

About

Professional Course and Student Management System built with Flask - Sistema de Gestão de Cursos e Matrículas

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors