Skip to content

OddSteak/cits3403_proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

265 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose of the Application

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.

How to Launch the Application

  1. Clone the Repository

    git clone https://github.com/your-username/your-repo-name.git
    cd your-repo-name
  2. Create and Activate a Virtual Environment

    python3 -m venv venv
    source venv/bin/activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. 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
  5. 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
    
  1. Initialize the Database

    flask db upgrade
  2. Run the Application

    flask run
  3. Access the Application


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.

1. Welcome Page

  • 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.

2. Login/Register

  • 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.

3. Navigation Bar

  • Purpose: Provides consistent navigation across the app.
  • Features:
    • Links to Profile (Stats), Share, and Typing Test pages.
    • Logout button for authenticated users.

4. Typing Test Page

  • 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.

5. Stats/Profile Page

  • 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.

6. Share Page

  • 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.


7. Base Templates

Additional Notes

  • 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.

How to Test the Application

  1. Activate Your Environment
    Ensure your virtual environment is activated.

  2. Set Up Testing Database
    Add the following line to your .env file to use an in-memory SQLite database:

    • TESTING_DB=sqlite:///:memory:
    • FLASK_ENV=testing
  3. Run Tests
    From the root directory, run:

  • 'python -m unittest discover test'
  1. View Results
    Test results will display in the terminal, indicating pass/fail status for each test.

Authors

UWA ID Name GitHub Username
23383597 Jerusha jerustarr
23895849 Baasil OddSteak
23101484 Lilee GitLilee
23398484 Teshan headislimane

About

Full-Stack Typing Test Web Application

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors