Commit graph

1668 commits

Author SHA1 Message Date
Nathan.fooo
e03a6ce587
test: fix collab edit test (#42)
* test: fix

* chore: cargo sqlx check workspce

* chore: remove rocksdb deps
2023-09-14 14:05:15 +08:00
Nathan.fooo
b1adcc7919
test: websocket connect and then edit collab test (#40)
* refactor: realtime dir

* test: add test

* test: fix
2023-09-14 09:34:24 +08:00
Zack
8d11d7b6cf
feat: support external oauth (#35)
* feat: support external oauth

* chore: cargo fmt

* doc: add docs for google oauth2

* fix: use btree map and get for oauth

* feat: client to open url for oauth login

* feat: add test case for oauth not available

* feat: add placeholder for sign_in_url

* fix: use

* feat: client sign up with url

* feat: add sign_in_with_url simple test

* fix: use url fragments and string split

* fix: test case and gotrue error handling

* fix: return error and remove unwrap

* chore: remove unused file not in module tree

* fix: test cases

* chore: add cfg feature cloud to isolate dependencies
2023-09-13 21:08:13 +08:00
Nathan.fooo
c42158b7cb
test: add ws connect test (#39)
* test: add ws connect test

* chore: format log
2023-09-13 17:04:42 +08:00
Nathan.fooo
107627f4d8
feat: implement snapshot handler (#38) 2023-09-13 15:25:51 +08:00
Nathan.fooo
3aa4d20ad3
chore: reduce deps of client_api crate (#37) 2023-09-13 13:12:07 +08:00
Nathan.fooo
b32fcff4d4
test: Collab handler test (#36)
* chore: implement collab requests

* test: add more tests

* chore: update scope path
2023-09-13 12:52:22 +08:00
Nathan.fooo
f0f58f98f3
feat: create collab handlers (#34)
* feat: logged user after sign up/sign in

* test: fix test

* chore: update sqlx files

* chore: add router

* chore: parser user uuid from token
2023-09-12 21:52:25 +08:00
Zack
0d59211e55
feat: expose workspace and profile api (#32)
* feat: expose workspace and profile api

* feat: add impl for client_api

* feat: add test case for workspace and profile
2023-09-12 16:14:14 +08:00
Nathan.fooo
9ac53dca8e
chore: implement collab storage using postrges (#31)
* chore: implement collab storage using postrges

* chore: update collab rev

* chore: update .sqlx files
2023-09-12 15:36:33 +08:00
Zack
da03009004
feat: use apply server migration when server starts (#30)
* feat: use apply server migration when server starts

* fix: add docs and fix local run

* feat: refactor migration

* feat: local build server wait on gotrue

* fix: add back sqlx commands

* fix: add migrations directory

* fix: try SQLX_OFFLINE=true

* test: fix rustlint

* chore: clippy fmt

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-09-12 15:12:08 +08:00
Zack
853f089ca0
feat: test gotrue when app start, use state for gotrue client, use go… (#24)
* feat: test gotrue when app start, use state for gotrue client, use gotrue UUID instead of BIGINT for user uid

* feat: backward compatibility with native authetication

* fix: native auth use uuid instead

* fix: sqlx preparation

* fix: sqlx metadata and unused variable

* fix: clippy

* fix: create workspace if not exist after sign in

* chore: update .sqlx with new query

* feat: query workspace

* revert: revert using i64 for user id

* fix: update sqlx queries

* fix: update .sqlx metadata

* feat: only use uuid from sqlx types, select user_profile view

* ci: add version check

* ci: add missing sqlx files

* chore: cargo fmt
2023-09-11 17:16:41 +08:00
Nathan.fooo
d0fdde7bf5
chore: remove unused deps (#29)
* chore: remove unused deps

* tests: fix
2023-09-11 16:21:16 +08:00
Nathan.fooo
4e964677b3
refactor: return AppError (#28)
* refactor: return AppError

* chore: impl from response for AppResponse
2023-09-11 15:23:55 +08:00
Nathan.fooo
63c992602f
tests: fix realtime tests (#27)
* tests: fix realtime tests

* chore: update collab rev

* ci: fix realtime ci

* ci: update test path
2023-09-11 15:14:58 +08:00
Nathan.fooo
3cd3240bfc
chore: move realtime test (#26)
* chore: fix tests

* chore: add test server

* chore: move tests
2023-09-10 19:35:29 +08:00
Nathan.fooo
f964d14002
chore: kill the appflowy_cloud instance if it already exist (#25) 2023-09-10 12:37:08 +08:00
Nathan.fooo
4a56cbb91f
refactor: refactor app data struct (#23)
* refactor: refactor app data struct to reduce memory cost

* refactor: rename AppData to AppResponse

* chore: implement traits

* chore: remove default features of actix-web
2023-09-10 11:56:22 +08:00
Nathan.fooo
7a09e1b860
chore: remove redundant sqlx command (#22)
* chore: remove redundant sqlx command

* chore: remove docker_env.sh

* chore: copy sqlx to docker

* chore update
2023-09-08 22:51:16 +08:00
Nathan.fooo
186ce6c5af
fix: run_local_server script (#21) 2023-09-08 20:35:06 +08:00
Zack
d4577f5e61
Feat: enrich http dto (#20)
* feat: add scripts for easier dev

* feat: add Json<T> as resp type for http server

* feat: restructure server and client shared entity

* feat: restructure server and client shared entity

* feat: use serde_repr to deserialize enum into json number

* feat: minor adjustment to results and server error

* feat: test: fix unconfirmed email message

* feat: test: add test case for existing user

* feat: test: modified api for sign_out

* feat: test: add test case pass
2023-09-08 20:01:28 +08:00
Nathan.fooo
384501a00d
refactor: save collab data in pg (#19) 2023-09-08 19:41:35 +08:00
Nathan.fooo
c1f8d79169
chore: separate crates (#18) 2023-09-07 19:40:11 +08:00
Zack
36499be26c
docs: test + deploy + environmental variables (#14)
* doc: test + deploy + environmental variables

* doc: local dev and testing(WIP)

* dev: set up local testing

* fix: ci: add DATABASE_URL env

* chore: update .env

* ci: fix

* dev: docker-compose-dev.yml

* ci: update

* ci: test env

* ci: add services

* ci: add services

* ci: update port

* ci: rename ci.yaml to rustlint.yaml

* ci: test

* ci: simplify tests

* ci: use cargo sqlx commands directly

* ci: fix: registered user

* ci: fix: test registered user creation

* ci: fix: test registered user creation - 2

* ci: fix: debug docker ci

* ci: fix: docker integration registered user

* ci: fix: docker integration registered user

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-09-07 15:29:39 +08:00
Nathan.fooo
e2e6d79cb0
chore: create tables (#16)
* chore: create tables

* ci: remove postgres service

* chore: separate ci

* chore: run cargo clippy with sqlx offline mode

* refactor: create docker action

* chore: rename

* chore: update table

* chore: update supabase_admin

* chore: update supabase_admin

* chore: remove create auth.jwt function
2023-09-07 10:43:10 +08:00
Nathan.fooo
f9825d4221
feat: refactor server collab (#15)
* refactor: collab storage

* chore: fix test

* chore: update sqlx version

* chore: disable realtime test

* chore: sqlx prepare

* chore: remove init.sql
2023-09-06 18:22:40 +08:00
Zack
b28d5dda4c
feat: ci: dockerize gotrue auth server (#13)
* feat: ci: dockerize gotrue auth server

* feat: build: add gotrue to docker-compose

* fix: build: docker-compose + test

* feat: ci: simplify tests

* feat: ci: add back needed services for compilation

* fix: ci: github secrets

* fix: ci: use signup

* fix: ci: add export

* fix: test: generate unique email for registration to avoid conflict
2023-09-06 14:12:39 +08:00
Zack
c8ae099e90
feat: Auth server integration (#9)
* feat: integrate signup with gotrue auth server

* feat: added email and password sign in via auth server

* feat: added sign in scenarios and client handling

* fix: added missing files

* feat: refine api and store access token in client

* feat: impl token decode and placeholder for signout

* feat: added impl for logout with auth server

* feat: auth server dependency injection, client sign_out impl

* feat: abstract verify token, add placeholder for update endpoint

* feat: make authorization as a param of http handler request

* feat: add update_user to client of auth server

* feat: add client code and test cases for password change

* chore: rename appflowy-server to appflowy-cloud

* ci: upgrade reqwest version to fix audit issue

* ci: fix again

* ci: added gotrue env secrets

---------

Co-authored-by: nathan <nathan@appflowy.io>
2023-09-04 11:23:40 +08:00
Zack
d50de4e4d8
feat: added capability to decode supabase web token (#8) 2023-08-11 08:43:21 +08:00
Zack
58f0cdd235
feat: Client API and Integration test (#7)
* feat: change to client from test_server

* feat: change to client from test_server: register_success

* fix: use time in email for indempotency

* added rest of register test case

* feat: added client impl for login

* feat: Client: store logged token

* feat: added password change impl

* feat: remove test api, move to using Client

* chore: remove unneeded code

* chore: add client's integration test

* chore: try fix github workflow

* chore: try fix github workflow

* chore: try fix github actions - 2

* chore: try fix github actions - change rust toolchain

* chore: try fix github actions - remove name field

* chore: ci: fixed missing run key

* chore: ci: fixed missing Checkout

* chore: ci: added env settings for docker-compose

* chore: ci: added env BACKEND_VERSION for docker-compose

* chore: ci: added context . to docker-compose.yml

* chore: ci: added old dockerfiles to archive, default values in docker-compose.yml

* chore: github workflow: build server with env SQLX_OFFLINE true

* chore: remove unneeded deps

* chore: ci: try SQLX_OFFLINE export

* fix: ci: remove unneeded integration test ci, spawn server while cargo test

* fix: lint and github workflow

* fix: lint

* fix: github workflows: use workspaces instead of key

* fix: lint: use as_deref instead
2023-08-10 09:49:47 +08:00
Nathan.fooo
e65b6333b1
Feat: multi ws conn (#6)
* feat: multi conn

* fix: multi connect
2023-08-08 16:13:18 +08:00
nathan
216860237f chore: add license 2023-07-28 21:05:27 +08:00
Nathan.fooo
8b9e6584d2
feat: ws reconnect (#5)
* feat: ws reconnect

* chore: update collab rev
2023-05-10 20:54:10 +08:00
Nathan.fooo
90ae1d5fb6
Feat/ws test (#4)
* test: ws test

* test: update

* test: update

* test: sync update

* feat: ws test
2023-05-10 20:26:30 +08:00
Nathan.fooo
18e950a829
feat: ws connect (#3)
* chore: ws

* chore: build client stream

* feat: test ws connect

* ci: fix ci
2023-05-08 19:03:50 +08:00
nathan
08847fad1d chore: disable zld linker 2023-05-05 09:13:05 +08:00
Nathan.fooo
bb80fd5350
fix: redis connect (#2)
* fix: redis connect

* chore: add Readme and support no tls

* chore: cache docker build

* chore: update

* fix: fix postgres and redis connection

* chore: update port

* ci: lint
2023-05-05 00:00:02 +08:00
nathan
920e7f9564 ci: fix audit 2023-03-16 21:33:11 +08:00
nathan
648ec41cf3 ci: fix warning 2023-03-16 21:16:46 +08:00
nathan
0ce76c5a89 feat: add document test 2023-03-16 21:01:36 +08:00
appflowy
2bc939479c feat: document crud 2023-03-16 17:42:55 +08:00
appflowy
0fa6536c7a refactor: use i64 as user id 2023-03-16 11:23:42 +08:00
nathan
277b54711c feat: add snowflake 2023-03-16 09:36:49 +08:00
nathan
2b3650eb63 feat: add sled 2023-03-15 21:08:52 +08:00
appflowy
6110c69374 feat: revdb 2023-03-15 17:21:18 +08:00
appflowy
faacd8dd47 feat: create token crate 2023-03-15 14:41:23 +08:00
nathan
b2c59409b8 feat: config network 2023-03-15 10:02:37 +08:00
nathan
bbcfe33fe7 fix: request fail caused by certificate issue 2023-03-15 09:32:23 +08:00
nathan
4adfd1a75f ci: fix test 2023-03-14 14:45:53 +08:00
nathan
aca7e8737e ci: add audit 2023-03-14 10:01:05 +08:00