A Python Flask web application featuring:
- Public contact form with submissions stored in SQLite
- Admin authentication system
- Admin management interface
- Responsive design with Bootstrap-like styling
- User-facing contact form (name, email, message)
- Admin login/logout functionality
- Admin dashboard to view submissions
- Admin management (add/remove admin users)
- SQLite database storage
- Environment variable configuration
- CSRF protection
- Password hashing
- Python 3.8+
- pip package manager
-
Clone the repository:
git clone https://github.com/gspagare/Full-Stack-Project.git cd Full-Stack-Project -
Create and activate virtual environment:
python -m venv venvvenv\Scripts\activatesource venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Create environment files:
Create .env file:
SECRET_KEY=your-secret-key-here DATABASE_URL=sqlite:///instance/site.db ADMIN_USERNAME=admin ADMIN_PASSWORD=securepassword123Create .flaskenv file:
FLASK_APP=app.py FLASK_ENV=development -
Database Setup:
The SQLite database will be automatically created in the instance folder when you first run the application.
python app.py
The application will be available at http://localhost:5000
-
Access the admin panel at http://localhost:5000/login
-
Log in using the credentials from your .env file
-
Immediately: Add a new admin account with secure credentials Log out and log in with the new admin account Delete the default admin account (recommended)