A modern, responsive web application built with Python Flask and featuring a clean, intuitive user interface for task management.
- ✨ Modern UI: Clean, responsive design with glassmorphism effects
- 📱 Mobile-Friendly: Works seamlessly across all devices
- 🎯 Task Management: Create, update, complete, and delete tasks
- 🚀 RESTful API: Complete API for task operations
- 🎨 Beautiful Design: Modern CSS with Font Awesome icons
- 💫 Interactive: Real-time updates and smooth animations
- Backend: Python, Flask
- Frontend: HTML5, CSS3, JavaScript
- Icons: Font Awesome
- Architecture: MVC Pattern
new-mit-project/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── templates/ # HTML templates
│ ├── index.html # Main page
│ └── about.html # About page
└── static/ # Static assets
├── css/
│ └── style.css # Main stylesheet
└── js/
└── app.js # JavaScript functionality
-
Clone or navigate to the project directory:
cd /Users/atul/Downloads/new-mit-project
-
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
For Development:
./run_dev.sh # or manually: export FLASK_ENV=development python app.py
For Production:
./run_prod.sh # or manually: export FLASK_ENV=production gunicorn --bind 0.0.0.0:8080 --workers 4 app:app
-
Open your browser and navigate to:
http://localhost:5000 (development) http://localhost:8080 (production)
- Copy files to your server
- Install dependencies:
pip install -r requirements.txt
- Set environment variables:
export FLASK_ENV=production export PORT=8080
- Run with gunicorn:
./run_prod.sh
- Build Docker image:
docker build -t python-webapp .
- Run container:
docker run -p 8080:8080 python-webapp
The app includes a Procfile
for easy deployment to platforms like:
- Heroku
- Google Cloud Platform
- AWS Elastic Beanstalk
- Azure App Service
FLASK_ENV=production
PORT
(auto-set by most cloud platforms)SECRET_KEY
(set a secure secret key)
The application supports multiple environments:
- Development: Debug enabled, detailed error messages
- Production: Optimized for performance and security
Environment variables:
FLASK_ENV
: Set to 'development' or 'production'PORT
: Port number (defaults to 5000 for dev, 8080 for prod)SECRET_KEY
: Secret key for session management
The application provides a RESTful API for task management:
Method | Endpoint | Description |
---|---|---|
GET | /api/tasks |
Get all tasks |
POST | /api/tasks |
Create a new task |
PUT | /api/tasks/:id |
Update a task |
DELETE | /api/tasks/:id |
Delete a task |
Create a new task:
curl -X POST http://localhost:5000/api/tasks \
-H "Content-Type: application/json" \
-d '{"title": "New Task", "description": "Task description"}'
Get all tasks:
curl http://localhost:5000/api/tasks
- Add new tasks with title and description
- Mark tasks as completed/pending
- Delete tasks with confirmation
- Real-time UI updates
- Modern glassmorphism design
- Responsive grid layout
- Interactive buttons with hover effects
- Toast notifications for user feedback
- Empty state handling
- Clean navigation bar
- About page with project information
- Responsive design for mobile devices
- Backend: Add new routes in
app.py
- Frontend: Update templates in
templates/
- Styling: Modify
static/css/style.css
- JavaScript: Enhance functionality in
static/js/app.js
Currently uses in-memory storage. To add database support:
- Choose a database (SQLite, PostgreSQL, etc.)
- Add database dependencies to
requirements.txt
- Update
app.py
with database models and connections
- Chrome (recommended)
- Firefox
- Safari (with webkit prefixes for backdrop-filter)
- Edge
The application runs in debug mode by default, which provides:
- Automatic reloading on file changes
- Detailed error messages
- Debug toolbar (if installed)
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Built with ❤️ using Python Flask