Fuzzy Lamp is a simple Flask web application that allows users to sign up and provides an admin panel to view all signups. The application uses SQLAlchemy for database interactions and supports PostgreSQL as the database backend.
- User signup with first name, last name, and email.
- Admin login to view all signups.
- In-memory SQLite database for testing.
- Docker support for easy deployment.
- Python 3.9
- Flask 2.0.3
- Flask-SQLAlchemy 2.5.1
- psycopg2-binary 2.9.3
- pytest 7.1.2
- Werkzeug 2.0.3
- SQLAlchemy 1.4.47
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/fuzzy-lamp.git cd fuzzy-lamp
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Start the application using Docker Compose:
docker-compose up --build
-
The application will be available at
http://localhost:5001
.
- To run the tests, use the following command:
pytest
project/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration for the web app
├── docker-compose.yml # Docker Compose file to run the app and PostgreSQL
├── templates/ # HTML templates
│ ├── signup.html # Signup page (with success messages)
│ ├── admin.html # Admin panel to list signups
│ └── login.html # Admin login page
├── tests/ # Pytest test cases
│ └── test_app.py
└── .devcontainer/ # VS Code dev container configuration
└── devcontainer.json
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
For any questions or inquiries, please contact Mr.A.