This application is designed to help users improve and track their typing skills through interactive typing tests. Users can take timed typing tests, receive instant feedback on their performance (such as words per minute and accuracy), and view detailed statistics about their progress over time. The platform also allows users to compare their results, share achievements, and compete with others, making the process of learning to type faster and more accurately both engaging and motivating.
-
Clone the Repository
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name -
Create and Activate a Virtual Environment
python3 -m venv venv source venv/bin/activate -
Install Dependencies
pip install -r requirements.txt
-
Set Environment Variables (if needed)
- For development, you may need to set the Flask app variable:
export FLASK_APP=run.py export FLASK_ENV=development
- For development, you may need to set the Flask app variable:
-
Configuration
-
Create a .env file in the root directory of the project and add the following environment variables:
DATABASE_URI=app.db FLASK_SECRET_KEY=super-secret-key JWT_SECRET=super-secret-key
-
Initialize the Database
flask db upgrade
-
Run the Application
flask run
- The app will be available at http://127.0.0.1:5000.
-
Access the Application
- Open your browser and go to http://127.0.0.1:5000.
Note:
- Make sure you have Python 3.7+ installed.
- If you encounter issues, check that all dependencies are installed and environment variables are set correctly.
- Purpose: Introductory landing page for new and returning users.
- Features:
- Brief description of the app's purpose.
- Highlights benefits such as instant statistics, progress tracking, and competition.
- "Let's Get Started!" button directs users to the login/register page.
- Responsive design with engaging visuals.
- Purpose: Allows users to create an account or log in.
- Features:
- Tabbed interface for switching between login and registration forms.
- Form validation and error display.
- Accessible from the welcome page and navigation bar.
- Purpose: Provides consistent navigation across the app.
- Features:
- Links to Profile (Stats), Share, and Typing Test pages.
- Logout button for authenticated users.
-
Purpose: Main interactive typing test interface.
-
Features:
- Displays a typing prompt and tracks user input in real time.
- Timer selection (15s, 30s, 60s, 90s) to customize test duration.
- Shows caret position to indicate where the next character will appear.
- "Restart" button to retake the test and "Cancel" button to exit to the stats page.
- Submits results to the backend for analysis and storage.
- Pop-up Results: After completing a typing test, a pop-up appears displaying your performance statistics, such as Words Per Minute (WPM), accuracy, and other relevant metrics. This immediate feedback helps users quickly assess their performance and decide whether to retry or review their stats.
- Purpose: Displays user statistics and performance analytics.
- Features:
- Line graph of WPM and accuracy over time (using Chart.js).
- Table of all typing attempts with details (WPM, accuracy, duration, date).
- Profile card with user info and aggregate stats (average WPM, accuracy, sessions).
- Cards for best and average WPM by test duration.
-
Purpose: The Share Page enables users to connect with others by sharing their typing results or custom messages. It fosters a sense of community and encourages friendly competition and collaboration.
-
Features:
-
User Search Functionality Users can search for registered users using a search bar. The search is powered by a live database query, providing instant, relevant user suggestions as you type.
-
Random Share Option Users can choose to share their results with a randomly selected user from the database. This promotes spontaneous interaction and engagement across the platform.
-
Shared Users List A dedicated section displays all users the current user has shared their profile with. From here, users can manage their sharing preferences, including the option to stop sharing results with specific users.
-
Inbox System The inbox shows invitations or shared messages received from other users. Clicking on an item in the inbox takes the user directly to the sender's profile stats page, encouraging exploration and comparison.
- app/templates/base/base.html: Main HTML skeleton for all pages.
- app/templates/base/base_nav.html: Extends the base template and includes the navigation bar.
- All pages use Bootstrap for responsive design and consistent styling.
- Static assets (CSS/JS) are located in the
app/static/directory. - User authentication is required for accessing most features except the welcome and login/register pages.
-
Activate Your Environment
Ensure your virtual environment is activated. -
Set Up Testing Database
Add the following line to your.envfile to use an in-memory SQLite database:- TESTING_DB=sqlite:///:memory:
- FLASK_ENV=testing
-
Run Tests
From the root directory, run:
- 'python -m unittest discover test'
- View Results
Test results will display in the terminal, indicating pass/fail status for each test.
| UWA ID | Name | GitHub Username |
|---|---|---|
| 23383597 | Jerusha | jerustarr |
| 23895849 | Baasil | OddSteak |
| 23101484 | Lilee | GitLilee |
| 23398484 | Teshan | headislimane |