Web application built on Svelte.js and Supabase for https://simplex-directory.asriyan.me
This repository is one of components. The entire project works on the following:
- Supabase project that stores list of all added SimpleX servers and availability statuses. Code: simplex-directory-supabase
- GitHub Actions Worker running the app what validates SMP servers and updates date in Supabase. Code: simplex-directory-servers-validator
- Cloudlare serving SPA app. Code is this repository
sequenceDiagram
participant SMP as SMP or XFTP server
participant GitHubActions as GitHub Actions Worker
participant Supabase
participant Cloudlare as Cloudflare pages
participant Browser
actor User
rect rgb(233, 255, 255)
note left of Supabase: Every 12 hours
GitHubActions ->> Supabase: Get list of servers
Supabase ->> GitHubActions: List of all servers
loop for each server
GitHubActions ->> SMP: Opens connection
alt server is available
SMP ->> GitHubActions: Response
end
end
end
rect rgb(233, 255, 255)
note left of User: User opens webapp
User -->> Browser: Opens website
Browser ->> Cloudlare: Request SPA
Cloudlare ->> Browser: JS/HTML/CSS
Browser ->> Supabase: Filter for list of servers
Supabase ->> Browser: List of servers
Browser -->> User: Displays SPA
end
- Setup simplex-directory-supabase locally or in cloud. This is backend service for the frontend app
- (optional) Setup Google Analytics
- (optional) Setup Sentry account and create Svelte project
- Create
ENV_FILE_CONTENT
repository variable and copy content of filled by you .env file in it
- Install docker
- Install dependencies:
make dev_install
Now you can run the dev server locally:
make dev_serve
make prod_build_bundle
- Each push to
master
triggers deployment to production - Make sure that
ENV_FILE_CONTENT
repository variable is filled