2.4 KiB
Type Practice
Type Practice is a web application designed to help users improve their typing skills through various practice exercises. It includes features for user registration, login, and an admin panel for managing code examples.
Features
- User Registration and Login
- Typing Practice Exercises
- Admin Panel for Managing Code Examples
- K-Means Algorithm Visualization (NEW!)
- Responsive Design
Technologies Used
- React
- TypeScript
- Node.js
- Express
- MongoDB
- Material-UI
Getting Started
Prerequisites
Ensure you have the following installed:
- Node.js
- npm (Node Package Manager)
- MongoDB
Installation
-
Clone the repository:
git clone https://github.com/bobcoc/typing_practiceweb.git cd typing_practiceweb -
Install server dependencies:
cd server npm install -
Install client dependencies:
cd ../client npm install
Running the Application
-
Start the MongoDB server.
-
Run the server and client concurrently:
cd .. npm run startThis will start both the server and client.
Environment Variables
Create a .env file in the root directory and add the following variables:
# Server Configuration
PORT=3001
NODE_ENV=development
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/typeskill
MONGODB_DB_NAME=typeskill
# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=24h
# Client Configuration
REACT_APP_CLIENT_URL=http://localhost:3001
You can copy the contents from .env.example and modify them according to your needs.
Usage
- Visit
http://localhost:3001to access the application. - Register a new account or log in with existing credentials.
- Admin users can access the admin panel to manage code examples.
- NEW: Access K-Means visualization demo at
http://localhost:3001/kmeans- See KMEANS_QUICKSTART.md for quick start guide
- See KMEANS_README.md for detailed documentation
- See KMEANS_DEPLOYMENT.md for deployment guide
Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements.
License
This project is licensed under the MIT License.
Contact
For any inquiries, please contact smshine@qq.com.