Modern dual-language web framework with built-in authentication and MySQL database support
Developed by Ananda Rauf Maududi
Powered by PT. Ananda Technology Solution
- Features
- Technology Stack
- Project Structure
- Prerequisites
- Installation
- Database Setup
- Running the Application
- API Endpoints
- Screenshots
- Deployment
- Troubleshooting
- License
- 🔐 Complete Authentication System - User registration, login, and session management
- 🎨 Modern UI/UX - Premium design with gradient effects, glassmorphism, and smooth animations
- 🗄️ MySQL Database - Robust data persistence with ORM support
- 🐍 Python Support - Flask framework with Pony ORM
- 💎 Ruby Support - Sinatra framework with ActiveRecord
- 🔒 Secure Passwords - Bcrypt hashing for password security
- 📱 Responsive Design - Works perfectly on desktop, tablet, and mobile
- 🚀 Production Ready - Gunicorn server configuration included
- 📊 User Dashboard - Personalized dashboard with user information
- Web Framework: Flask 2.3+
- ORM: Pony ORM 0.7+
- Database Driver: PyMySQL 1.1+
- Password Hashing: bcrypt 4.0+
- Production Server: Gunicorn 21.2+
- Database: MySQL 8.0+
- Web Framework: Sinatra 3.0+
- ORM: ActiveRecord 7.0+
- Database Driver: mysql2 0.5+
- Password Hashing: bcrypt 3.1+
- Production Server: Puma 6.0+
- Database: MySQL 8.0+
Rope_Web_Backend_Framework/
├── controller/
│ ├── views_controller.py # Flask routes and controllers
│ └── views_controller.rb # Sinatra routes and controllers
├── models/
│ ├── models_db.py # Pony ORM User model
│ └── models_db.rb # ActiveRecord User model
├── database/
│ ├── config_db.py # Python database configuration
│ ├── config_db.rb # Ruby database configuration
│ └── setup_database.sql # SQL schema creation script
├── views/
│ ├── login.html # Login page
│ ├── register.html # Registration page
│ ├── dashboard.html # User dashboard
│ └── assets/
│ ├── auth.css # Authentication pages styles
│ └── dashboard.css # Dashboard styles
├── run_rope.py # Python application entry point
├── gunicorn_config.py # Gunicorn production configuration
├── requirements.txt # Python dependencies
├── Gemfile # Ruby dependencies
├── .env.example # Environment variables template
├── Procfile # Deployment configuration
└── README.md # This file
- Python 3.8 or higher
- MySQL 8.0 or higher
- pip (Python package manager)
- Ruby 3.0 or higher
- MySQL 8.0 or higher
- Bundler (Ruby gem manager)
- MySQL Server running on your machine
- Terminal/Command Prompt access
cd "c:\Users\NFI\Downloads\Punya Rauf\Rope_Web_Backend_Framework"pip install -r requirements.txtCopy .env.example to .env and update with your settings:
copy .env.example .envEdit .env file:
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=rope_db
SECRET_KEY=your-secret-key-herebundle installSame as Python version - create .env file with database credentials.
The framework will automatically create the database and tables when you run the application for the first time.
CREATE DATABASE rope_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;USE rope_db;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
email VARCHAR(100) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_username (username),
INDEX idx_email (email)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;mysql -u root -p < database/setup_database.sqlpython run_rope.pyThe application will start at: http://localhost:5000
gunicorn -c gunicorn_config.py run_rope:appruby controller/views_controller.rbpuma controller/views_controller.rb| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Home page (redirects to login or dashboard) |
| GET | /register |
User registration page |
| POST | /register |
Process user registration |
| GET | /login |
User login page |
| POST | /login |
Process user login |
| GET | /dashboard |
User dashboard (requires authentication) |
| GET | /logout |
Logout and clear session |
Premium authentication interface with gradient backgrounds and smooth animations.
Modern sign-up form with client-side validation and error handling.
Professional user dashboard showing welcome message, user statistics, and account information.
The Procfile is already configured for Heroku:
# Login to Heroku
heroku login
# Create new app
heroku create your-app-name
# Add MySQL addon
heroku addons:create cleardb:ignite
# Get database URL
heroku config:get CLEARDB_DATABASE_URL
# Set environment variables
heroku config:set SECRET_KEY=your-secret-key
# Deploy
git push heroku main- Install Python, MySQL, and Nginx
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Configure Nginx as reverse proxy
- Run with Gunicorn:
gunicorn -c gunicorn_config.py run_rope:app - Set up as systemd service for auto-restart
Problem: ✗ Database connection failed
Solutions:
- Ensure MySQL server is running
- Check database credentials in
.envor environment variables - Verify database
rope_dbexists - Test connection:
mysql -u root -p
Problem: ModuleNotFoundError
Solutions:
- Install dependencies:
pip install -r requirements.txt - Verify Python version:
python --version(should be 3.8+) - Use virtual environment (recommended)
Problem: Port 5000 already in use
Solutions:
- Stop other application using port 5000
- Change port in
run_rope.pyorgunicorn_config.py - On Windows:
netstat -ano | findstr :5000to find process
Problem: bcrypt errors
Solutions:
- Reinstall bcrypt:
pip install --upgrade bcrypt - On Windows, may need Visual C++ Build Tools
- Change Secret Key: Always change
SECRET_KEYin production - Database Credentials: Never commit
.envfile to version control - HTTPS: Use HTTPS in production for secure data transmission
- Password Policy: Current minimum is 6 characters - adjust as needed
- Session Timeout: Default is 1 hour - configure in
views_controller.py
Python (Flask):
@app.route('/new-route')
def new_route():
return render_template('new_page.html')Ruby (Sinatra):
get '/new-route' do
erb :new_page
endWhen modifying models, update both Python and Ruby versions to maintain compatibility.
This project is licensed under the MIT License.
Ananda Rauf Maududi
Profesional Developer
Version 1.0.0
Powered by: PT. Ananda Technology Solution
For issues, questions, or contributions, please contact the development team.
Built with ❤️ using Python & Ruby




