A Cutting-Edge Microservice for Efficient Storage, Retrieval, and Collaboration of Competitive Programming Language Templates, and Event Management..
Introducing "Cp Microservices": Your Microservice for Effortless Template Storage, Retrieval, and Empowering Competitive Programmers.. Cp Microservices is a powerful microservice designed specifically for programmers. It offers a simple and convenient solution for storing and retrieving template solutions, tailored to competitive programming languages. Our microservice aims to empower developers by providing an effortless experience and ready-to-use templates that simplify coding tasks and boost productivity. Cp Microservices is not only a hub for programming language templates but also a powerful resource for staying updated on upcoming contests across various platforms. Our microservice ensures that you are well-informed about coding competitions, challenges, and hackathons hosted on popular platforms like Codeforces, Topcoder, AtCoder, LeetCode, and more.
To install and run this project locally, you'll need to have the following dependencies installed:
- Node.js
- npm
- grpc
- express
- cors
- axios
This project is a microservice with an API gateway that accepts requests in JavaScript and sends them to two microservices using gRPC architecture.
The API gateway exposes the following endpoints:
-
GET /creator/:id
: Retrieve templates based on the providedid
, which is in the format ofcreator-language
(e.g., 'iheb-cpp'). -
POST /template
: Create a new template.Example Request Body:
{ "creator": "John Doe", "description": "Template description", "language": "C++" }
Example Response:
{ "creator": "John","token": "abcd1234" }
-
DELETE /del/:id: Delete a template based on the provided id = tocken.
Example Response:
{ "success": true }
-
GET /templates/:id: Retrieve a template based on the provided id = tocken.
-
GET /contest: Get upcoming contests.
Example Response:
{ [ { "name": "Codeforces Round (Div. 1)", "startTimeSeconds": "1687098900" }, { "name": "Codeforces Round (Div. 2)", "startTimeSeconds": "1687098900" } ] }
-