A full-stack web platform for interacting with various LLMs (OpenAI, Gemini, Claude), featuring full conversation context control, and Markdown + LaTeX rendering.
- Front End: Node.js, React.js, Next.js, Tailwind CSS, MUI
- Back End: Node.js (Nest.js), Python (FastAPI)
- Storage: PostgreSQL, RustFS, Redis
- Authentication: Firebase (Email Verification), Google Sign-In
- Infrastructure: Linux (Debian 12), Kubernetes (K3S), Nginx
- DevOps: GitHub Actions
- Payment: Creem
- Copy
./app-secret.example.yamlto./app-secret.yamland./app-secret-test.yaml, modify value for each key.
- Create and configure a Debian VM with 4GB RAM by following
https://github.com/windsnow1025/Notes/blob/main/Configuration/CloudVM.md - JetBrains IDEA >>
Settings>>SSH Configurations: login as root
- Install Nginx with Stream module
- In
<nginx_config_path>: create./nginx.confand./sites-available/default
-
Stream Block in
./nginx.conf:stream { server { listen 3306; proxy_pass localhost:33306; } server { listen 6379; proxy_pass localhost:36379; } server { listen 9000; proxy_pass localhost:39000; } server { listen 9001; proxy_pass localhost:39001; } } -
HTTP Block in
./sites-available/default:server { server_name <domain_name>; client_max_body_size 100M; location / { proxy_pass http://localhost:30080/; proxy_buffering off; proxy_request_buffering off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /kubernetes/ { proxy_pass http://localhost:34466; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
JetBrains IDEA >> Settings >> Build, Execution, Deployment >> Deployment
- Add
SFTP - Add
Mapping- Deployment Path:
/root/kubernetes, Local Path:./kubernetes - Deployment Path:
/etc/nginx, Local Path:<nginx_config_path>
- Deployment Path:
- Select
Deployment Paths inRemote Host:Sync with local...
- Install Certbot
- Nginx
Sync with local
Follow https://github.com/windsnow1025/Notes/blob/main/Configuration/K3S.md
Apply Custom Configs in ./KubernetesCommand.md
In Google Auth Platform, for App and Test
- Branding
- Application home page: https://<domain_name>
- Application privacy policy link: https://<domain_name>/about/privacy
- Application terms of service link: https://<domain_name>/about/terms
- Authorized domains: <top_domain_name>
- Clients
- Authorized JavaScript origins
- http://localhost
- http://localhost:3000
- https://<domain_name>
- Authorized JavaScript origins
- Main
http://localhost:30080/https://<domain_name>/
- Kubernetes Dashboard
http://localhost:34466/kubernetes/https://<domain_name>/kubernetes/
- S3 Dashboard
http://localhost:39001/
- Prepare Private Key
dos2unix <id_rsa_filepath>- Add in OpenSSH config
Host <tunnel_name>
HostName <domain_name>
User root
IdentityFile <id_rsa_filepath>
LocalForward 5432 localhost:5432
LocalForward 6379 localhost:6379
LocalForward 9000 localhost:9000
LocalForward 9001 localhost:9001
ExitOnForwardFailure yes
ServerAliveInterval 30
- Run JetBrains Tunnel configs
GitHub >> Repository >> Settings >> Security >> Secrets and variables >> Actions
- Secrets >> Repository secrets: add
DOCKERHUB_TOKEN - Variables >> Repository variables: add
DOCKERHUB_USERNAME