This repository contains the implementation of a full-stack chess player data application. The application is designed to efficiently retrieve, process, and display data from the Lichess.org API. The backend is built using Node.js and MongoDB, while the frontend is developed with React.
-
Clone the repository:
git clone [https://github.com/black-sheepp/lichess-api]
-
Navigate to the backend directory:
cd /backend
-
Install dependencies:
npm install
-
Ensure MongoDB is installed and running.
-
Run the API server:
npm start
Efficiency strategies are implemented to optimize data processing time. Refer to the Performance Optimization section for details.
- GET /top-players: Retrieves a list of the top 50 classical chess players.
- GET /player/{username}/rating-history: Retrieves the 30-day rating history for a specified player.
- GET /players/rating-history-csv: Generates and provides a CSV file with the rating history for the top 50 players.
The MongoDB database is designed to store player usernames and their respective rating histories. Refer to the schema in the models
directory.
-
Run tests:
npm start
-
Access API documentation using Swagger:
Open your browser and navigate to
http://localhost:3000/
.
-
Navigate to the frontend directory:
cd /frontend
-
Install dependencies:
npm install
-
Run client:
npm run dev
Optimization strategies are applied for efficient data fetching and state management. Refer to the Performance Optimization section for details.
-
Implement user login/logout functionality.
-
Add error handling and display appropriate user feedback.
Focus on writing clean, well-documented, and organized code. Adhere to best coding practices.
Implement security measures for both the API and frontend. Ensure secure data transmission and storage. Consider authentication best practices.
Feel free to reach out for any further assistance or clarification. Happy coding!