A typing game application built with Flask that allows users to practice their typing speed using poems.
- Typing Speed Test: Practice typing with beautiful poems
- Author and Poem Selection: Choose from various authors and their works
- Real-time WPM Calculation: Get instant feedback on your typing speed
- Admin Interface: Manage authors and poems through Flask-Admin
- Responsive Design: Works on desktop and mobile devices
-
Clone the repository
git clone <repository-url> cd Poetype
-
Create virtual environment
python -m venv .venv
-
Activate virtual environment
- Windows:
.venv\Scripts\activate
- macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp env.example .env # Edit .env with your configuration -
Initialize the database
flask init-db flask populate-db
-
Run the application
python app.py
The application will be available at
http://localhost:5000
pytestblack src/
isort src/flake8 src/flask db init
flask db migrate -m "Initial migration"
flask db upgradePoetype/
├── app.py # Application entry point
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── env.example # Environment variables template
├── instance/ # Instance-specific files (database, config)
├── static/ # Static files (CSS, JS, images, fonts)
├── templates/ # HTML templates
├── tests/ # Test files
└── src/ # Application source code
├── __init__.py # Application factory
├── config.py # Configuration classes
├── ext.py # Flask extensions
├── commands.py # CLI commands
├── admin/ # Admin interface
├── models/ # Database models
├── utils/ # Utility functions
└── views/ # Route handlers
The application uses environment variables for configuration:
SECRET_KEY: Flask secret key for sessionsDATABASE_URL: Database connection stringFLASK_ENV: Environment (development/production)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.