https://github.com/255doesnotexist/lyrio-ui
Lyrio UI Reloaded with Contest and Codeforces legacy like rating @ Node 24 & React 18
https://github.com/255doesnotexist/lyrio-ui
Last synced: about 2 months ago
JSON representation
Lyrio UI Reloaded with Contest and Codeforces legacy like rating @ Node 24 & React 18
- Host: GitHub
- URL: https://github.com/255doesnotexist/lyrio-ui
- Owner: 255doesnotexist
- License: mit
- Created: 2025-11-18T07:20:14.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-11-27T12:21:23.000Z (6 months ago)
- Last Synced: 2025-11-29T13:51:02.503Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 3.73 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lyrio UI
[](https://github.com/lyrio-dev/ui/actions?query=workflow%3ABuild)
[](https://david-dm.org/lyrio-dev/ui)
[](http://commitizen.github.io/cz-cli/)
[](https://github.com/prettier/prettier)
[](LICENSE)
[](https://www.jsdelivr.com/package/npm/@lyrio/ui)
The web frontend of Lyrio.
# Development
Clone this git repo and install dependencies:
```bash
$ git clone git@github.com:lyrio-dev/ui.git lyrio-ui
$ cd lyrio-ui
$ yarn
```
By default this app listens on `0.0.0.0:3000`, you can change this with the environment variables `PORT` and `HOST`. You can use nginx as reversed proxy to access the app with a domain name like `lyrio-ui.test`.
Start [lyrio](https://github.com/lyrio-dev/lyrio) API server. For example, if the API server in accessible on `http://lyrio.test`, the API endpoint is actually `http://lyrio.test` (without `/api`).
* If the API endpoint is not the same as the lyrio-ui's root url, you should replace the `__api_endpoint__` string in lyrio-ui's HTML (e.g. with Nginx's `ngx_http_sub_module` module) with the API endpoint (in the form of JS expression, e.g. `"http://lyrio.test"`).
* To change the initial title of the page, replace `__default_title__`.
* To load compiled frontend resources from another host, replace `__public_path__`.
* To change the favicon, replace `__favicon__`.
All these replacements work in development or production environment.
Here's a Nginx development configuration file for reference (don't forget to add the `.test` domains to your `hosts` or local DNS server):
```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name lyrio-ui.test;
listen 80;
location / {
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Accept-Encoding "";
sub_filter '__default_title__' '"Default Title"';
sub_filter '__api_endpoint__' '"http://lyrio.test"';
sub_filter_once on;
proxy_pass http://127.0.0.1:3000;
}
}
server {
server_name lyrio.test;
listen 80;
location / {
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:2002;
}
}
```
If you run API server and the frontend app server on different [origins](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) like me, you should enable `crossOrigin` in this server's config and configure the API server to white list this server's origin. For example, if you access this server on `http://lyrio-ui.test`:
```yaml
security:
crossOrigin:
enabled: true
whiteList:
- http://lyrio-ui.test
```
Start the development server:
```bash
$ yarn start
```
Wait for Vite to finish compilation and the development server to start, then open `http://lyrio-ui.test`.