Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasonlovesdoggo/abacus
A simple counting api written in Go https://abacus-zz5vvckvua-uc.a.run.app
https://github.com/jasonlovesdoggo/abacus
countapi countapi-alternative go
Last synced: 21 days ago
JSON representation
A simple counting api written in Go https://abacus-zz5vvckvua-uc.a.run.app
- Host: GitHub
- URL: https://github.com/jasonlovesdoggo/abacus
- Owner: JasonLovesDoggo
- Created: 2024-03-13T06:32:43.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-13T21:44:02.000Z (8 months ago)
- Last Synced: 2024-05-13T22:46:23.416Z (8 months ago)
- Topics: countapi, countapi-alternative, go
- Language: Go
- Homepage: http://jasoncameron.dev/abacus/
- Size: 111 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Abacus—A highly scalable and stateless counting API
> Note: Abacus was designed as a direct replacement/upgrade for [CountAPI](https://countapi.xyz/) as it got taken downIn order to get started, please visit the docs at https://abacus.jasoncameron.dev
---
### Development1. Install Golang & Redis
2. Run `go mod install` to install the dependencies
3. Add a `.env` file to the root of the project (or set the environment variables manually) following the format specified in .env.example4. Run `air` (if installed) or `go build` to build and run the API locally.
5. The API will be running on `http://0.0.0.0:8080` by default.
## Todos
- [x] Documentation (https://abacus.jasoncameron.dev)
- [x] ~~K8 Deployment~~ (Render + Redis on OCI)
- [x] JSONP Support (https://gin-gonic.com/docs/examples/jsonp/)
- [x] impl /create endpoint which creates a new counter initialized to 0 and returns a secret key that can be used to modify the counter via the following endpoints
- [x] /delete endpoint
- [x] /set endpoint
- [x] /reset (alias to /set 0)
- [x] /update endpoint (updates the counter x)
- [x] SSE Stream for the counters? Low priority.
- [x] Tests
- [x] Rate limiting (max 30 requests per 3 second per IP address)
- [ ] Create [Python](https://github.com/BenJetson/py-countapi), [JS Wrappers](https://github.com/mlomb/countapi-js) & Go client libraries