An online video sharing platform for teaching and learning coding and programming languages.
- Back-end: go with Fiber and SQLC.
- Front-end: rust with leptos and Actix-Web.
The back-end is written in Go using the Fiber framework, and follows a MSC (Model-Service-Controller) pattern. The database is managed using SQLC.
The API is RESTful and follows the expired Hypertext Application Language (HAL) Internet-Draft.
Our project is divided into go packages with the following structure:
├─── app
│ app.go
│ config.go
│ logger.go
│ validator.go
├─── controllers
│ controllers.go
│ helpers.go
│ middleware.go
│ *.controller.go
├─── dtos
│ dtos.go
│ bodies.go
│ query_params.go
│ responses.go
│ *.dto.go
├─── exceptions
│ controller_exceptions.go
│ service_exceptions.go
├─── paths
│ paths.go
├─── providers
│ ├─── cache
│ │ cache.go
│ │ *.go
│ ├─── database
│ │ ├─── migrations
│ │ │ *.down.sql
│ │ │ *.up.sql
│ │ ├─── queries
│ │ │ *.sql
│ │ database.go
│ │ db.go
│ │ models.go
│ │ *.model.go
│ │ *.sql.go
│ ├─── email
│ │ email.go
│ │ *.go
│ ├─── oauth
│ │ oauth.go
│ │ *.go
│ ├─── object_storage
│ │ object_storage.go
│ │ *.go
│ ├─── tokens
│ │ tokens.go
│ │ *.go
├─── routers
│ routers.go
│ *.router.go
├─── services
│ services.go
│ helpers.go
│ *.service.go
├─── utils
│ utils.go
│ *.go
├─── test
│ ├─── fixtures
│ │ *.pdf/jpeg/...
│ common_test.go
│ *_e2e_test.go
TODO
-
Cd into the
kiwiscript_go
directory. -
Install Go.
-
Copy the
.env.example
file to.env
and fill in the required environment variables. -
Generate the JWT keys using the following command:
make keygen
-
Start DB, Cache and S3 services with Docker-Compose or Podman-Compose.
# For Docker make dc-up # For Podman make pm-up
-
Create the database.
# For Docker make create-db # For Podman make create-pm-db
-
Install go-migrate and run the migrations.
make migrate-up
-
Run the server.
make dev
-
Cd into the
kiwiscript_go
directory. -
Start DB, Cache and S3 services with Docker-Compose or Podman-Compose.
# For Docker make dc-up # For Podman make pm-up
-
Create the test database.
# For Docker make create-test-db # For Podman make create-pm-test-db
-
Run migrations for the test database.
make migrate-test-up
-
Run the tests.
make test
TODO
TODO
The code of this project is licensed under the Gnu General Public License v3.0. You can find the license here.