Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and improve Cloudmos API #54

Closed
6 of 8 tasks
Redm4x opened this issue Nov 21, 2023 · 9 comments
Closed
6 of 8 tasks

Refactor and improve Cloudmos API #54

Redm4x opened this issue Nov 21, 2023 · 9 comments
Assignees

Comments

@Redm4x
Copy link
Collaborator

Redm4x commented Nov 21, 2023

Refactor the Cloudmos API to enhance usability and maintainability. More and more projects in the akash ecosystem would benefit from using the cloudmos API in their project and this is the ground work for making it more accessible and developer-friendly.

  • Improve naming convention (consistent, lowercase, no verbs)
  • Refactor endpoint implementations to be more consistent (controller > service) Renamed providers to services for clarity
  • Add versioning for backward compatibility (ex: /v1/deployments)
  • Add authorization system (allow other projects to use our hosted api, enable CORS?)
  • Add api documentation (probably swagger)
  • Update cloudmos UI to call the new API
  • Monitoring + analytics
  • Add documentation to the readme
@Redm4x Redm4x self-assigned this Nov 21, 2023
@Redm4x
Copy link
Collaborator Author

Redm4x commented Nov 28, 2023

November 28, 2023:

Started working on the api refactor and planning the new api structure (naming/versioning), Looking at the possibility to change the framework (expressjs) for something more modern like Hono.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Dec 5, 2023

December 5, 2023:

Hono seems like a good option. Currently implementing the OpenAPI/Swagger UI integrations.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Dec 12, 2023

December 12, 2023:

Going forward with Hono and their Zod/OpenAPI/Swagger intergrations. I'll share the swagger definition with the team for review as soon as it's ready.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Dec 19, 2023

December 19, 2023:

Still working on a prototype of the new api. Had an issue with date serializing, but it should be fixed in the latest version of Hono [edit: Confirmed Fixed].

@stayForward09
Copy link

Thanks with great API routes.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Jan 9, 2024

January 9, 2024:

The api versioning is implemented. Doing progress on refactoring every endpoints, I deployed a preview url for keeping track of the progress through swagger UI:
https://api-preview.cloudmos.io/v1/swagger

@Redm4x
Copy link
Collaborator Author

Redm4x commented Jan 16, 2024

January 16, 2024

  • Finished almost all route refactoring, only the endpoints for logged in users remain:
    • Public Api Routes ✅
    • Private Dashboard Routes ✅
    • Web3Index Routes ✅
    • User Routes (login/templates/favorites) 🕐
  • Improved typescript typing across the board
  • Updated the deploy-tool to use new endpoints

Expecting to create a PR this week. I updated the Preview URL with the latest changes.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Jan 23, 2024

January 23, 2024:

Finished refactoring the user routes (login/templates/favorites) and authorization middlewares. Created a draft PR for self review. I will add documentation to the README and make the PR ready for review today. The api key system is not implemented, but I think it's best to split it into it's own task.

@Redm4x
Copy link
Collaborator Author

Redm4x commented Jan 30, 2024

January 30, 2024:

PR is in review, created issue #92 to track the remaining tasks (authentitcation system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released (in Prod)
Development

No branches or pull requests

3 participants