Skip to main content

Clover API

AI Code Suggestion Server Documentation

CLOVER API

Hosted Here API Docs Report Issue on Jira

Documentation Website Link

Abstract

This is an API written in Go for CLOVER, a tool that supports a collaborative programming learning environment, and its website. It provides endpoints for user authentication, code suggestion tracking, classroom activity logging, and more.

Tech Stack

  • Go 1.24.4
  • PostgreSQL (via Supabase)
  • Gin web framework
  • Air for hot reloads
  • Docker for deployment
  • OpenAPI for API docs

Getting Started

Install Go

Install instructions can be found here. The version currently being used is 1.24.4.

Install Air(Optional)

Air provides live reloading so it can be helpful to have when developing.

go install github.com/air-verse/air@latest

Then in the root directory of the project run the "air" command If it does not work make sure the Go bin is in your path.

Running

go run cmd/server/main.go

or

air

Environment Variables

See .env.example for where to get all the variables you will need. Mainly a Supabase project and a Google Gemini API key.

Testing

This project uses Postman for regression testing. The tests are run on every push and pull request to the main branch.

To run the tests locally, you will need to have Newman installed. You can install it with npm:

npm install -g newman

Then, you can run the tests with the following command:

make test

Contributing

We welcome contributions! Please open issues, submit pull requests, or reach out with suggestions.

  1. Fork the repo
  2. Create your branch (git checkout -b feature/thing)
  3. Commit your changes (git commit -am 'Add thing')
  4. Push to the branch (git push origin feature/thing)
  5. Open a pull request

License

This project is licensed under the MIT License. See LICENSE for details.

Collaborators

Jamie
Jaime
Antonio
Antonio
Sophie
Sophie
Nick
Nick
Jack
Jack
ApplebaumIan
Ian Tyler Applebaum
Contributors

Made with contrib.rocks.