Copy .env.example to .env and set the environment variables:
cp .env.example .envcargo run| Route | Type | Headers | Content | Description |
|---|---|---|---|---|
/api/health |
GET | None | None | Check the health of the system. |
/api/compile |
POST | Content-Type: application/json | {"code": "String", "input": "String"} | Compile and run the provided Zen code. |
/api/signup |
POST | Content-Type: application/json | {"username": "String", "name": "String", "password": "String", "email": "String"} | Register a new user. |
/api/login |
POST | Content-Type: application/json | {"email": "String", "password": "String"} | Log in with user credentials. |
/api/private |
GET | Authorization: Bearer <valid-token> |
None | Access a private route with a valid token. |
/api/quiz |
POST | Content-Type: application/json | { "code": "String", "testcases": [{"input": "String", "expected_output": "String"}] } | To support quiz checks |
/api/send_email/:email |
POST | None | None | To request password reset emails |
/api/reset |
POST | Content-Type: application/json | { "email": "String", "verification_token": "String", "new_password": "String" } | To reset the password based on verification token. |
/api/changepassword |
POST | Authorization: Bearer <valid-token>Content-Type: application/json |
{ "new_password": "String" } | To change password of authenticated users |