feat: end to end api type safety with redis rate limiting (#573)
* feat: support hono rpc * add wrangler file * update name of wrangler file * add wrangler as a dependency * add compatibility_flags * trigger ci * core: add health check to docker file * expose port 80 * update custom healthcheck * feat: implement openapi * install dependencies in root * debug yml * update yml * update port * update dockerfile with envs * completely move away from apiClient * rename backend to api * refactor: update server descriptions and comment out local spec saving * update lock file * use api.classroomio.com * add support for redis * fix: add missing line break in WelcomeModal.svelte * refactor: remove wrangler configuration and update Vite config for API integration
This commit is contained in:
@@ -10,19 +10,19 @@ This guide will help you quickly selfhost ClassroomIO
|
||||
|
||||
ClassroomIO is made up of the following applications
|
||||
|
||||
- [apps/backend](https://github.com/rotimi-best/classroomio/tree/main/apps/backend) - an Express server
|
||||
- [apps/api](https://github.com/rotimi-best/classroomio/tree/main/apps/api) - an Express server
|
||||
- [apps/dashboard](https://github.com/rotimi-best/classroomio/tree/main/apps/dashboard) - the admin dashboard + LMS
|
||||
- [supabase](https://github.com/rotimi-best/classroomio/tree/main/supabase) - the database + REST API.
|
||||
|
||||
The quickest and easiest way to deploy both the backend and dashboard is by using our [Railway Template](https://railway.app/template/dl9RG7?referralCode=8OyIj5). However there are a couple of things that you'd need first before heading over to the template, which are:
|
||||
The quickest and easiest way to deploy both the api and dashboard is by using our [Railway Template](https://railway.app/template/dl9RG7?referralCode=8OyIj5). However there are a couple of things that you'd need first before heading over to the template, which are:
|
||||
|
||||
1. SMTP values - For sending emails on the backend
|
||||
1. SMTP values - For sending emails on the api
|
||||
2. Supabase - For the database used on the dashboard
|
||||
3. Cloudflare R2 (optional) - Video uploads on the backend
|
||||
3. Cloudflare R2 (optional) - Video uploads on the api
|
||||
|
||||
## SMTP Setup
|
||||
|
||||
Both for the supabase and backend setup, you'd need a custom SMTP for email sending. Most importantly you need these values:
|
||||
Both for the supabase and api setup, you'd need a custom SMTP for email sending. Most importantly you need these values:
|
||||
|
||||
```bash
|
||||
SMTP_HOST=
|
||||
@@ -63,7 +63,7 @@ We use Cloudflare R2 for video uploading within the course builder. It is not re
|
||||
|
||||
## Deploy on Railway
|
||||
|
||||
Now you have everything you need and you are ready to deploy the backend and dashboard.
|
||||
Now you have everything you need and you are ready to deploy the api and dashboard.
|
||||
|
||||
Go ahead and click this button to get started.
|
||||
|
||||
@@ -71,7 +71,7 @@ Go ahead and click this button to get started.
|
||||
|
||||
### Environment Variables.
|
||||
|
||||
#### cio-backend
|
||||
#### cio-api
|
||||
|
||||
```bash
|
||||
# Required
|
||||
@@ -94,7 +94,7 @@ SENTRY_DNS=""
|
||||
|
||||
<Callout type="info" emoji="ℹ️">
|
||||
Learn more about the environment variables
|
||||
[here](https://github.com/rotimi-best/classroomio/blob/main/apps/backend/.env.example)
|
||||
[here](https://github.com/rotimi-best/classroomio/blob/main/apps/api/.env.example)
|
||||
</Callout>
|
||||
|
||||
#### cio-dashboard
|
||||
@@ -121,7 +121,7 @@ PRIVATE_APP_SUBDOMAINS=""
|
||||
|
||||
## Using Docker
|
||||
|
||||
We provide a docker-compose configuration to deploy both the backend and dashboard services. Here's how to use it:
|
||||
We provide a docker-compose configuration to deploy both the api and dashboard services. Here's how to use it:
|
||||
|
||||
1. Clone the repository:
|
||||
|
||||
@@ -151,7 +151,7 @@ The docker-compose file sets up two services:
|
||||
|
||||
- Runs on port 3002
|
||||
- Uses Node.js slim image
|
||||
- Mounts the backend code directory
|
||||
- Mounts the api code directory
|
||||
- Requires environment variables for:
|
||||
- Supabase configuration
|
||||
- Cloudflare R2 for video uploads
|
||||
|
||||
Reference in New Issue
Block a user