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

[update/README] #20

Merged
merged 3 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

This project aims to implement a decoupled & scalable architecture for url shortener service.

# Showcase

| Login | Signup |
| ------------- | ------------- |
| ![login.png](url-shortener/images/login.png) | ![signup.png](url-shortener/images/signup.png) |

| Main |
| -------- |
| ![main.png](url-shortener/images/main.png) |



# Architecture

This project uses:
Expand All @@ -14,5 +26,3 @@ This project uses:
- Terraform is used for Infrastructure creation and Ansible playbooks and roles are used for configuring EC2 instances created on AWS providing:
- Installation of Docker on those instances
- Running of the url-shortener service through user input


9 changes: 9 additions & 0 deletions url-shortener/frontend-servers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Frontend-Servers

This directory contains the `docker-compose` file for running up both the frontend, the backend and the proxy server containers all at once.

The container images are available on docker-hub, so the `compose.yaml` can be edited to pull the image instead of building them locally. The respective links are:
- <a href="https://hub.docker.com/r/arnavneo/nextjs-frontend">Frontend Image</a>)
- <a href="https://hub.docker.com/r/arnavneo/ejserver">Express Image</a>
- <a href="https://hub.docker.com/r/arnavneo/nginx-proxy">Nginx Proxy</a>
- <a href="https://hub.docker.com/r/arnavneo/goserver">Go Image</a>
8 changes: 8 additions & 0 deletions url-shortener/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Frontend

The frontend uses Nextjs framework and has the following pages:
- Login Page
- Signup Page
- Url shortener dashboard

`env.example` has been provided as the `.env` template. The frontend only requires `NEXT_PUBLIC_BACKEND_URL` environment variable to be present in the running system. Either create the `.env` or inject/set as the variable in the system.
Binary file added url-shortener/images/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added url-shortener/images/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added url-shortener/images/signup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions url-shortener/k8/base/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# K8 Setup

`frontend` and `servers` directories contain the required manifest files for setting up the project on a kubernetes cluster.
This directory aims for the container orchestration of frontend, backend server and nginx as the reverse proxy between the formers. The `frontend` and `servers` directories contain the required manifest files for setting up the project on a kubernetes cluster (this project was created on minikube).

## Pre-requisites

The specified secrets (env variables) values need to be substituted in the target backend server secrets manifest files under `secrets` directory.
The specified secrets (env variables) values need to be substituted in the target backend server secrets manifest files under `secrets` directory for the backend to work.

## Order of setup

Let's choose expressjs as our backend server (goserver under dev).
Let's choose expressjs as our backend server.

1) Create all the services under `servers/services/` directory and then proceed forward.

Expand Down
4 changes: 4 additions & 0 deletions url-shortener/servers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Servers

- This directory contains the respective code for both the `express-js` and `go` backend along with the `nginx` reverseproxy.
- The `compose.yaml` is the docker compose for running the above servers all at once.
8 changes: 8 additions & 0 deletions url-shortener/tf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Infrastructure Creation

The `services` directory contains the terraform code for creating the project Infrastructure on the AWS. It creates:
- the security group that allows access on the following ports:
- `22`: for `ssh` access
- `3000`: the server where the frontend will be running

- EC2 instance with the above security group attached.
Loading