diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb18662 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Panels + +A proof-of-concept forum application created using a microservices architecture. + +![Panels Banner](/docs/img-1.png) + +## About + +This application was created as a hobby project in spare time. In current form the application serves as a proof of concept containing bare-bones functionality. + +There are definitely aspects that I'd like to improve or polish further, in addition to some ideas for functionality that I would like to implement at some point. As such, the project should be considered a work-in-progress at this stage. + +## Architecture + +Users are served the React site from the ``frontend`` and make calls to the REST API exposed by the ``gateway-service``. The ``gateway-service`` makes calls to the relevant services for the request. + +Interservice communication is handled through RPC calls (utilising [gRPC](https://grpc.io/)) and [event sourcing](https://microservices.io/patterns/data/event-sourcing.html) (utilising [Kafka](https://kafka.apache.org/)). + +![Architecture](/docs/img-2.png) + +## Services + +I used a variety of languages for writing the services as this was created as a hobby project and the architecture gave me some room to play around with. + +| Service | Language | Datastores | Description | +| --- | --- | --- | --- | +| [frontend](/services/frontend) | TypeScript (React) | N/A | Web-based user interface | +| [gateway-service](/services/gateway-service) | Golang | N/A | Exposes a HTTP REST API to allow users to communicate with the application. | +| [panel-service](/services/panel-service) | Golang | [PostgreSQL](https://www.postgresql.org/), [Redis](https://redis.io/) | Responsible for operations related to panels | +| [post-service](/services/post-service) | Golang | [PostgreSQL](https://www.postgresql.org/), [Redis](https://redis.io/) | Responsible for operations related to posts | +| [user-service](/services/user-service) | TypeScript (Node) | [MongoDB](https://www.mongodb.com/) | Responsible for operations related to users | +| [auth-service](/services/auth-service) | Python | [PostgreSQL](https://www.postgresql.org/) | Responsible for authenticating users | +| [comment-service](/services/comment-service) | Python | [PostgreSQL](https://www.postgresql.org/), [Redis](https://redis.io/) | Responsible for operations related to comments | + +## Deployment and Configuration + +For more information about configuration and deployment, please view the [documentation](/docs/README.md) located in the ``/docs`` folder. + +## License + +**Acknowledgments:** + +* Logo Icon: [Tabler Icons](https://github.com/tabler/tabler-icons) ([MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE)) +* Logo Font: [Oregano](https://fonts.google.com/specimen/Oregano) ([Open Font License](https://scripts.sil.org/OFL)) + +This repository is licensed under the [Apache License v2.0](/LICENSE). diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..9ec436d --- /dev/null +++ b/docs/README.md @@ -0,0 +1,41 @@ +# Panels Documentation + +## Contributing + +This project is a work-in-progress hobby project, however contributions are welcome. Please feel free to open issues or make a pull request. + +## Deployment + +### Using [Kubernetes](https://kubernetes.io/): + +The application can be deployed to Kubernetes using [Skaffold](https://skaffold.dev/): + +> skaffold run + +Note that when deploying to Kubernetes you will need to have deployed Redis, Postgres and Mongo instances off cluster and adjusted your configuration for the services. + +### Using [Docker](https://www.docker.com/): + +The application can be easily deployed with [Docker Compose](https://docs.docker.com/compose/) using the following command from the root directory: + +> docker compose up + +When deploying using Docker Compose, the default container configuration (exposed as environment variables in [docker-compose.yaml](/docker-compose.yaml)) can be left as is. + +This is presuming that the [docker-compose.override.yaml](/docker-compose.override.yaml) file, which contains specification for the instances that each service requires, is also being used. However, if solely the [docker-compose.yaml](/docker-compose.yaml) is being used then the configuration will need to be changed to point to your instances of the databases. + +## Configuration + +For an outline on the environment variables that each service requires, or events that are produced/consumed by the services, view the documentation for the individual services (located in the ``README.md`` files of each service folder). + +Here is a table for easy access: + +| Service | Documentation | Example Configuration | +| --- | --- | --- | +| [frontend](/services/frontend) | [README.md](/services/frontend/README.md) | [.env.example](/services/frontend/.env.example) | +| [gateway-service](/services/gateway-service) | [README.md](/services/gateway-service/README.md) | [.env.example](/services/gateway-service/.env.example) | +| [panel-service](/services/panel-service) | [README.md](/services/panel-service/README.md) | [.env.example](/services/panel-service/.env.example) | +| [post-service](/services/post-service) | [README.md](/services/post-service/README.md) | [.env.example](/services/post-service/.env.example) | +| [user-service](/services/user-service) | [README.md](/services/user-service/README.md) | [.env.example](/services/user-service/.env.example) | +| [auth-service](/services/auth-service) | [README.md](/services/auth-service/README.md) | [.env.example](/services/auth-service/.env.example) | +| [comment-service](/services/comment-service) | [README.md](/services/comment-service/README.md) | [.env.example](/services/comment-service/.env.example) | \ No newline at end of file diff --git a/docs/img-1.png b/docs/img-1.png new file mode 100644 index 0000000..367d783 Binary files /dev/null and b/docs/img-1.png differ diff --git a/docs/img-2.png b/docs/img-2.png new file mode 100644 index 0000000..270b387 Binary files /dev/null and b/docs/img-2.png differ