Compare commits
4 Commits
4d92bc3e86
...
main
Author | SHA1 | Date | |
---|---|---|---|
573568ee6d | |||
9308ebba54 | |||
793d464eda | |||
bfdc915631 |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
|
||||
"$id": "file:///etc/config/kratos/default.schema.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Person",
|
||||
"title": "default",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"traits": {
|
||||
@ -10,6 +10,7 @@
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"title": "E-Mail",
|
||||
"minLength": 3,
|
||||
"ory.sh/kratos": {
|
||||
"credentials": {
|
||||
@ -31,7 +32,7 @@
|
||||
"minLength": 3
|
||||
}
|
||||
},
|
||||
"required": ["email"],
|
||||
"required": ["email", "username"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,28 @@
|
||||
version: v0.10.1
|
||||
|
||||
dsn: memory
|
||||
dev: true
|
||||
|
||||
serve:
|
||||
public:
|
||||
base_url: http://127.0.0.1:4433/
|
||||
cors:
|
||||
enabled: true
|
||||
allowed_origins:
|
||||
- http://127.0.0.1:3000
|
||||
allowed_methods:
|
||||
- POST
|
||||
- GET
|
||||
- PUT
|
||||
- PATCH
|
||||
- DELETE
|
||||
allowed_headers:
|
||||
- Authorization
|
||||
- Cookie
|
||||
- Content-Type
|
||||
exposed_headers:
|
||||
- Content-Type
|
||||
- Set-Cookie
|
||||
admin:
|
||||
base_url: http://kratos:4434/
|
||||
|
||||
|
40
README.md
40
README.md
@ -1 +1,41 @@
|
||||

|
||||
|
||||
# twitch-clone
|
||||
|
||||
A Twitch clone to experiment with various technologies.
|
||||
|
||||

|
||||
|
||||
## Technologies
|
||||
- ScyllaDB for storing messages, compatible with Cassandra but much faster. Usage is inspired by Discord's usage of the technology.
|
||||
- Ory Kratos for auth, a very comprehensive open-source Auth0 competitor.
|
||||
- Sentry for client-side monitoring, to help find bugs or other issues early.
|
||||
- Next.JS for the frontend, React with SSR important for SEO and to speed up the initial load.
|
||||
- Tailwind for styling, eliminating the need to manage stylesheets.
|
||||
|
||||
## Dependencies
|
||||
- [podman](https://github.com/containers/podman)
|
||||
- [pnpm](https://github.com/pnpm/pnpm)
|
||||
- [node](https://github.com/nodejs/node)
|
||||
- [go](https://github.com/golang/go)
|
||||
|
||||
## Usage
|
||||
Start the necessary infrastructure:
|
||||
```sh
|
||||
podman-compose up
|
||||
```
|
||||
|
||||
Start the frontend:
|
||||
```sh
|
||||
cd client
|
||||
pnpm i
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
Start the chat-service:
|
||||
```
|
||||
go run ./cmd/chat-service/main.go
|
||||
```
|
||||
|
||||
## Disclaimer
|
||||
I am in no way affiliated with Amazon or Twitch.
|
||||
|
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/screenshot.png
Normal file
BIN
assets/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
1
client/.env.sample
Normal file
1
client/.env.sample
Normal file
@ -0,0 +1 @@
|
||||
ORY_SDK_URL=http://localhost:4433
|
@ -45,6 +45,7 @@ const SignupForm: FC = () => {
|
||||
password: data.password,
|
||||
traits: {
|
||||
email: data.email,
|
||||
username: data.username,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ services:
|
||||
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
# - POSTGRES_DB=${POSTGRES_DB}
|
||||
chat-service-scylla:
|
||||
image: scylladb/scylla
|
||||
image: docker.io/scylladb/scylla
|
||||
ports:
|
||||
- 7000:7000
|
||||
- 7001:7001
|
||||
@ -29,7 +29,7 @@ services:
|
||||
- 9160:9160
|
||||
- 10000:10000
|
||||
kratos-migrate:
|
||||
image: oryd/kratos:v0.10.1
|
||||
image: docker.io/oryd/kratos:v0.10.1
|
||||
environment:
|
||||
- DSN=postgres://${KRATOS_POSTGRES_USER}:${KRATOS_POSTGRES_PASSWORD}@kratos-postgres:5432/${KRATOS_POSTGRES_DB}?sslmode=disable&max_conns=20&max_idle_conns=4
|
||||
volumes:
|
||||
@ -41,7 +41,7 @@ services:
|
||||
kratos:
|
||||
depends_on:
|
||||
- kratos-migrate
|
||||
image: oryd/kratos:v0.10.1
|
||||
image: docker.io/oryd/kratos:v0.10.1
|
||||
ports:
|
||||
- '4433:4433' # public
|
||||
- '4434:4434' # admin
|
||||
@ -57,12 +57,12 @@ services:
|
||||
source: .docker/kratos
|
||||
target: /etc/config/kratos
|
||||
mailslurper:
|
||||
image: oryd/mailslurper:latest-smtps
|
||||
image: docker.io/oryd/mailslurper:latest-smtps
|
||||
ports:
|
||||
- '4436:4436'
|
||||
- '4437:4437'
|
||||
kratos-postgres:
|
||||
image: postgres:9.6
|
||||
image: docker.io/postgres:9.6
|
||||
ports:
|
||||
- '5432:5432'
|
||||
environment:
|
||||
|
Reference in New Issue
Block a user