Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
Merged
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
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### Description and intent

PaaSTech is a self-hostable PaaS (Platform as a Service), that is centred around offering the developer a simple deployment and operational experience.
Like every PaaS, the aim is to provide the users, in this case web developers, with an efficient and powerful way to package, deploy and expose their applications.
PaaSTech is a self-hostable PaaS (Platform as a Service), that is centred around offering developers a simple deployment and operational experience.
Like every PaaS, the aim is to provide users, in this case web developers, with an efficient and powerful way to package, deploy and expose their applications.

The main features are:

Expand All @@ -31,48 +31,6 @@ The website sends requests to the client API with the use of Axios HTTP Client.
All of this makes Axios one of the most straightforward solutions to use.
To simplify the development of the connection with the API, our team has used the [OpenAPI Generator](https://openapi-generator.tech/) tool which generated TypeScript objects and functions for every controller and endpoint in our API. The auto-generated code uses Axios to send requests, and is based on the OpenAPI specification of the API which was conveniently provided to us by NestJS once we added the `SwaggerModule`.

**Website structure**

The web application offers to users several public and protected routes, which give access to the main PaaSTech features.

An anonymous user can view:

- The home page
- The login and sign-up pages
- The email verification and password reset pages

On top of that, an authenticated user has access to their personal dashboard, which includes:

- their profile
- their projects
- their projects' information
- actions and logs for a given project
- environment variables
- project settings (which just allow to delete a project for now)

See the schema of the app routes below to better understand how the web interface is structured:

```mermaid
flowchart LR
A{App} --> B[Public]
A --> C[Protected]
B -->|'root' /| D(HomePage)
C -->|/dashboard/| E(DashboardHomePage)
D -->|login| F(LoginPage)
D -->|register| G(RegisterPage)
D -->|email-verification/:token| H(EmailVerificationPage)
D -->|password-recovery| I(PasswordRecoveryPage)
D -->|password-reset/:token| J(PasswordResetPage)
E -->|profile| K(ProfilePage)
E -->|:projectId| L(DashboardDetails)
L -->|logs| M(LogsTab)
L -->|env| N(EnvironmentTab)
L -->|settings| O(SettingsTab)
```
As mentioned earlier, the website is divided into two parts: publicly-accessible and protected. Public endpoints are those related to user authentication, including password recovery and account activation via email validation. The `:token` parameter used both for email verification and password reset is a UUID value which a user receives by email. This URL parameter is mandatory as it is used by the API to find a corresponding user in the database and either validate their account or authorize a password reset (cf. [Database Architecture](#database-architecture)).

The routes which allow users to access their profile and projects are not available for anonymous visitors. When accessing the `/dashboard` route, a user can view a list of all their existing projects. Clicking on one of the list items will open a page with more details about a particular project. The `:projectId` parameter in the page URL is thus the UUID of a project in the database, it is sent to the API to fetch additional data about the project.

#### CLI (Command-Line Interface)

The CLI tool, or Command Line Interface tool, is the main way for a User to create and deploy Projects. It has been developed in [Go](https://go.dev/) for its ease of use, its cross-platform compatibility and its overall great performances. Moreover, the Go language is well suited for CLI development, as it is a compiled language. It is used in many other CLI tools, such as Docker, Kubernetes, Terraform, and more.
Expand Down Expand Up @@ -452,6 +410,48 @@ Each time a Client connects to a protected endpoint, the API guards automaticall

In order to ease the communication with the other services, the API needed to return a uniform response. By using [Interceptors](https://docs.nestjs.com/interceptors), we were able to filter all outgoing data before it was sent to the Client. Every endpoint will return a json object containing a status as well as a message that contains the actual data to return.

#### Website structure

The web application offers to users several public and protected routes, which give access to the main PaaSTech features.

An anonymous user can view:

- The home page
- The login and sign-up pages
- The email verification and password reset pages

On top of that, an authenticated user has access to their personal dashboard, which includes:

- their profile
- their projects
- their projects' information
- actions and logs for a given project
- environment variables
- project settings (which just allow to delete a project for now)

See the schema of the app routes below to better understand how the web interface is structured:

```mermaid
flowchart LR
A{App} --> B[Public]
A --> C[Protected]
B -->|'root' /| D(HomePage)
C -->|/dashboard/| E(DashboardHomePage)
D -->|login| F(LoginPage)
D -->|register| G(RegisterPage)
D -->|email-verification/:token| H(EmailVerificationPage)
D -->|password-recovery| I(PasswordRecoveryPage)
D -->|password-reset/:token| J(PasswordResetPage)
E -->|profile| K(ProfilePage)
E -->|:projectId| L(DashboardDetails)
L -->|logs| M(LogsTab)
L -->|env| N(EnvironmentTab)
L -->|settings| O(SettingsTab)
```
As mentioned earlier, the website is divided into two parts: publicly-accessible and protected. Public endpoints are those related to user authentication, including password recovery and account activation via email validation. The `:token` parameter used both for email verification and password reset is a UUID value which a user receives by email. This URL parameter is mandatory as it is used by the API to find a corresponding user in the database and either validate their account or authorize a password reset (cf. [Database Architecture](#database-architecture)).

The routes which allow users to access their profile and projects are not available for anonymous visitors. When accessing the `/dashboard` route, a user can view a list of all their existing projects. Clicking on one of the list items will open a page with more details about a particular project. The `:projectId` parameter in the page URL is thus the UUID of a project in the database, it is sent to the API to fetch additional data about the project.

#### CLI and login process

In order to log in from the CLI tool, the Client must have first created an account on the web frontend since the CLI tool does not allow for account creation.
Expand Down