This repository holds the backend code for Awaik.
- About
- Goals
- Related Repositories
- Getting Started
- Tests
- Built Using
- Deployment
- Todo
- Authors
- Acknowledgments
- Contributing
Awaik is a service uptime monitoring tool that periodically sends requests to services, awaits a response, and checks that they are awake (get it... awaik 👈👈)
Awaik is a fairly new project, but one that has been in the books for a while. It shares a nice balance between useful, real-world, challenging, yet simple in its goal.
Here is a list of features Awaik intends to support, and their current status!
✅ = implemented 🚧 = in development ⏰ = not yet started
Phase 0 - design and architect the project, event flow, service composition, etc.
- ✅ Microservice Structure
- Using a similar approach to the go
database/sql
package, services now register themselves so that the entrypoint atcmd/awaik/main.go
can dynamically load and host services as they grow - Services now have a clearly defined structure, utilising concepts from hexagonal architecture, domain-driven design, while keeping the codebase idiomatic.
- Using a similar approach to the go
- 🚧 Event Producers/Consumers
- Producing - Kafka integration is well under way, with the MonitorCommandService producing events with every write operation.
- Consuming - this is currently in development, and should be ready to PR soon!
- 🚧 Persistence
- Cassandra is a bit of a beast compared to other NoSQL/document-based databases, and the way the data is structured is quite important to its performance! I still have a bit of work to do before I have the right data structure, but this is at the highest priority right now!
- 🚧 DevOps & Community
- Containerisation - write dockerfiles to encapsulate build and runtime environments
- Repo automation - dependencies, builds, releases, etc.
- Repository love - setup the things that are missing
- 😸 Fun stuff
- Keeping the project fun is crucial to its success, that's why I added a cute little terminal user interface and will be spending as much time researching and learning as necessary!
Phase 1 - with the groundwork done, the actual features can be implemented
- Infrastructure - move from proof-of-concept/dev configs to production-ready infrastructure (see awaik-infrastructure)
- 🚧 Monitors - allow users to monitor services through numerous protocols (HTTP, ICMP, Browser Automation, etc.), across various regions
- CRUD operations for monitors
- HTTP
- ICMP
- Port
- Browser Automation
- Multi-region
- ⏰ Heartbeats - provide a URL for services to send a pulse to
- Heartbeat endpoint
- ⏰ Status Page - display uptime, downtime, and service health on a customisable status page
- Editor (simplified)
- Preview (availability reports)
- Custom URL
- ⏰ Alerts & Notifications - send alerts through various integrations when services are down
- Slack
- Discord
- Many more
Phase 2 - once the core features are in, development of nice-to-have features can commence
- ⏰ Users & Teams - add a user and team layer
- ⏰ Incidents & Maintenance - allow users to report incidents, tag downtime, and schedule maintenance
- ⏰ Public API - manage all aspects of Awaik via HTTP requests, fully documented with OpenAPI
- ⏰ Secrets - allow users to store secrets for their monitors and heartbeats to allow the use of protected endpoints
- ⏰ Integrations & Automation - allow Awaik to connect to various services, allowing users to define how to react to unhealthy services
Phase 3 - SaaS
- ⏰ Infrastructure as Code
- ⏰ Scaling with Kubernetes
- ⏰ Venture into the reams of hosting Awaik as a SaaS platform for those who do not with to self-host to enjoy!
- awaik - Landing page
- awaik-frontend - Frontend repository for connecting to Awaik services
- awaik-backend - Backend repository responsible for Awaik's functionality
- awaik-infrastructure - Scripts and configs for Awaik's infrastructure
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This project is currently developed on macOS, and so all instructions are written as such. They will be updated overtime, or if you want to update them sooner open a PR!
Awaik backend is made up of many services. As a way to keep development fun and easy, Awaik comes with an optional terminal user interface!
Simply add the --tui
flag and you will be greeted with the following:
make install
awaik --tui
To run Awaik headless, simply run the binary with either the flag --all
for all services, or multiple --service [SERVICE NAME]
flags indicating the various services to host!
make install
awaik --service MonitorCommandService --service MonitorQueryService
Running tests is as running the following:
make test-setup
make test
Tests will also automatically run on pushes and pull requests.
Deployment details will come once services and decisions are more solidified. Check back here every so often!
- Go - Backend code
- Cassandra - Persistent data storage
- Kafka - Asynchronous message queues
- Hashicorp Vault - Secret storage
- Envoy Proxy and Istio - Reverse proxy and service mesh
- Docker and Kubernetes - Containerisation and orchestration of various services
- AWS - Infrastructure
- Terraform/OpenTofu - Infrastructure as Code
- React - Frontend and internal web dashboards
- @taylow - Founder
See also the list of contributors who participated in this project.
- Stack inspiration came from Monzo, as this is what they listed in a job opening, and I wanted to build something that used the same stack
- Hat tip to Christian Selig for their apollo-backend repository; a fantastic example of a production-ready server written in Go
- Thanks to my friend Connor O'Brien for helping me come up with a silly name for it, after all, you can't truly start a project until you know the domain exists and the SEO isn't already saturated, right? right??
- Another thanks to my talented friend Dylan Thomas for the adorable cat logo!