Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 895563d

Browse files
committed
chore: update readme
1 parent 43c9ffb commit 895563d

File tree

3 files changed

+72
-23
lines changed

3 files changed

+72
-23
lines changed

README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@
1717

1818
## About
1919

20-
This is a WIP implementation of a Spacebar compatible Server in Rust!
20+
This is a WIP implementation of a polyproto-chat compatible Server in Rust.
21+
22+
!!! info
23+
24+
This server is still in early development and thus not yet usable.
25+
26+
2127

2228
This repository contains:
2329
A partial implementation of:
2430

25-
- [HTTP API Server](/src/api)
26-
- [HTTP CDN Server](/src/cdn)
27-
- [WebSocket Gateway Server](/src/gateway)
28-
- [Database Models](/src/database)
31+
- [HTTP API Server](/src/crates/symfonia-api)
32+
- [WebSocket Gateway Server](/src/crates/symfonia-gateway)
33+
- [Database Models](/src/crates/util/migrations)
2934

3035
## Local Development/Test Environment
3136

@@ -35,6 +40,8 @@ Whether you are using Docker or not, you will need to have the following install
3540
- [git](https://git-scm.com/downloads)
3641
- [`sqlx-cli`](https://crates.io/crates/sqlx-cli)
3742

43+
You will also have to run `git submodule update` after cloning the repository.
44+
3845
If your development environment is hosted on a Windows machine, please additionally make sure that
3946
you have a bash shell available to execute pre-commit hooks. This can be done by installing
4047
[Git Bash](https://git-scm.com/downloads) or
@@ -57,12 +64,8 @@ DATABASE_PASSWORD=[Your Postgres password]
5764
DATABASE_NAME=[Your Postgres database name]
5865
API_BIND=[ip:port to bind the HTTP API server to. Defaults to 0.0.0.0:3001 if not set]
5966
GATEWAY_BIND=[ip:port to bind the Gateway server to. Defaults to 0.0.0.0:3003 if not set]
60-
# For rauthy:
61-
COOKIE_MODE=danger-insecure
6267
```
6368

64-
4. Install and host an instance of [rauthy](https://github.com/sebadob/rauthy). Documentation on how
65-
to do this can be found [here](https://sebadob.github.io/rauthy/intro.html).
6669
5. Install the sqlx CLI with `cargo install sqlx-cli`
6770
6. Run `cargo sqlx migrate run` from within the project directory to run the migrations
6871
7. Run the project with `cargo run`.
@@ -71,19 +74,8 @@ COOKIE_MODE=danger-insecure
7174

7275
1. Copy the `compose-example.env` file to `.env` in the root of the compose project and fill in the values
7376
to your liking.
74-
2. Create a `rauthy.cfg` in the root of the compose project and fill in the
75-
values according to [the rauthy documentation. A reference config is included on that page](https://sebadob.github.io/rauthy/config/config.html#reference-config).
76-
77-
!!! tip
78-
79-
rauthy also supports PostgreSQL as a database backend, but comes with [Hiqlite](https://github.com/sebadob/hiqlite)
80-
as a default database backend.fe
81-
82-
3. Adjust ports in `docker-compose.yml` if needed.
83-
4. Run `docker compose up --build`.
84-
85-
If you haven't edited the corresponding `rauthy.cfg` settings, the default user for rauthy is `admin@localhost.de`.
86-
The password will be generated at first launch and you can discover it using `docker compose logs`.
77+
2. Adjust ports in `docker-compose.yml` if needed.
78+
3. Run `docker compose up --build`.
8779

8880
Code changes will require you to restart the container with `docker compose up --build`. If you want
8981
to reset to a fully clean state, run `docker compose down -v`.

crates/sonata

Submodule sonata updated 1 file

file-renamer.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
# Check if correct number of arguments provided
4+
if [ $# -ne 2 ]; then
5+
echo "Usage: $0 <start_number> <add_number>"
6+
echo "Example: $0 00005 2"
7+
exit 1
8+
fi
9+
10+
start_num="$1"
11+
add_num="$2"
12+
directory="crates/util/migrations"
13+
14+
# Convert start_num to integer for comparison
15+
start_int=$(echo "$start_num" | sed 's/^0*//')
16+
start_int=${start_int:-0} # Handle case where start_num is all zeros
17+
18+
# Check if directory exists
19+
if [ ! -d "$directory" ]; then
20+
echo "Directory $directory does not exist"
21+
exit 1
22+
fi
23+
24+
# Find files matching pattern and filter by number >= start_num
25+
files_to_rename=()
26+
while IFS= read -r -d '' file; do
27+
filename=$(basename "$file")
28+
if [[ $filename =~ ^([0-9]{5})_(.+)\.sql$ ]]; then
29+
file_num="${BASH_REMATCH[1]}"
30+
file_int=$(echo "$file_num" | sed 's/^0*//')
31+
file_int=${file_int:-0}
32+
33+
if [ "$file_int" -ge "$start_int" ]; then
34+
files_to_rename+=("$filename:$file_int")
35+
fi
36+
fi
37+
done < <(find "$directory" -maxdepth 1 -name "*.sql" -print0)
38+
39+
# Sort files by number (descending to avoid conflicts during renaming)
40+
IFS=$'\n' sorted_files=($(printf '%s\n' "${files_to_rename[@]}" | sort -t: -k2 -nr))
41+
42+
# Rename files
43+
for entry in "${sorted_files[@]}"; do
44+
filename="${entry%:*}"
45+
file_num="${entry#*:}"
46+
47+
new_num=$((file_num + add_num))
48+
new_filename=$(printf "%05d_%s" "$new_num" "${filename:6}")
49+
50+
old_path="$directory/$filename"
51+
new_path="$directory/$new_filename"
52+
53+
echo "Renaming $old_path to $new_path"
54+
git mv "$old_path" "$new_path"
55+
done
56+
57+
echo "Done!"

0 commit comments

Comments
 (0)