An idiomatic, minimal-dependencies real-time chat app.
1. Prerequisites:
- Docker installed with docker-compose pluggin.
- Goose (or other similar tool) for database schemas migration.
- Ngrok (optional) if you wanna publish the app to the internet.
- Sqlc (optional) if you wanna make change in the sql schemas/queries.
2. Clone repository:
git clone https://github.com/anhtr13/synth-socket.git
cd synth-socket3. Start the app:
-
Run the application locally:
docker compose up --build
-
Migrate the SQL schemas:
goose postgres postgres://xbro:123@localhost:5433/synth_socket up --dir sql/schemas
-
If you wanna publish to the internet to play with your friends:
-
Install Ngrok and add authtoken by following the instructions here.
-
Publish the application online:
ngrok http 3000
-
4. How to use:
- First create a room.
- Make some friends and invite them to your room.
- You can create multiple rooms but not with the same name.
- You can only invite friends to rooms that you created.
- coder/websocket to handle websocket connections.
- jackc/pgx for Postgres driver.
- Front-end: VueJS, Pinia, Zod, Tailwindcss, etc.
