You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-65
Original file line number
Diff line number
Diff line change
@@ -54,63 +54,14 @@ The platform itself is useful for professional independent coaches, informal men
54
54
55
55
Please note that the script assumes that the password for the new PostgreSQL user is `password`. If you want to use a different password, you'll need to modify the script accordingly.
56
56
57
-
<<<<<<< HEAD
58
-
### Set Up Database Manually
59
-
60
-
Note: these are commands meant to run against a real PostgreSQL server with an admin-level user.
61
-
62
-
```sql
63
-
-- create new database `refactor_platform`
64
-
CREATEDATABASErefactor_platform;
65
-
```
66
-
67
-
Change to the `refactor_platform` DB visually if using an app like Postico, otherwise change using the PostgreSQL CLI:
68
-
69
-
```sh
70
-
\c refactor_platform
71
-
```
72
-
73
-
```sql
74
-
-- create new database user `refactor`
75
-
CREATEUSERrefactor WITH PASSWORD 'password';
76
-
-- create a new schema owned by user `refactor`
77
-
CREATESCHEMAIF NOT EXISTS refactor_platform AUTHORIZATION refactor;
78
-
-- check to see that the schema `refactor_platform` exists in the results
-- grant all privileges on schema `refactor_platform` to user `refactor`
81
-
GRANT ALL PRIVILEGES ON SCHEMA refactor_platform TO refactor;
82
-
```
83
-
84
-
### Run Migrations
85
-
86
-
Note: this assumes a database name of `refactor_platform`.
87
-
88
-
```bash
89
-
DATABASE_URL=postgres://refactor:password@localhost:5432/refactor_platform sea-orm-cli migrate up -s refactor_platform
90
-
```
91
-
92
-
### Generate a New Entity from Database
93
-
94
-
Note that to generate a new entity using the CLI you must ignore all other tables using the `--ignore-tables` option. You must add the option for _each_ table you are ignoring.
95
-
96
-
```bash
97
-
DATABASE_URL=postgres://refactor:password@localhost:5432/refactor_platform sea-orm-cli generate entity -s refactor_platform -o entity/src -v --with-serde both --serde-skip-deserializing-primary-key --ignore-tables {table to ignore} --ignore-tables {other table to ignore}
98
-
```
99
-
100
-
=======
101
-
>>>>>>> main
102
57
## Starting the Backend
103
58
104
59
To run the backend directly outside of a container:
105
60
106
61
The first example will start the backend with log level DEBUG and attempt to connect to a Postgres DB server on the same machine with user `refactor` and password `password` on port `5432` and selecting the database named `refactor_platform`.
107
62
108
63
```bash
109
-
<<<<<<< HEAD
110
-
cargo run -- -l DEBUG -d postgres://refactor:password@localhost:5432/refactor_platform
111
-
=======
112
64
cargo run -- --tiptap-url https://<TIPTAP_APP_ID>.collab.tiptap.cloud --tiptap-auth-key=<TIPTAP_API_SECRET> --tiptap-jwt-signing-key=<TIPTAP_CLOUD_APP_SECRET> --tiptap-app-id=<TIPTAP_APP_ID>
113
-
>>>>>>> main
114
65
```
115
66
116
67
To run with a custom Postgresql connection string:
@@ -131,13 +82,9 @@ cargo run -- --allowed-origins="http://192.168.1.2:3000,https://192.168.1.2:3000
131
82
132
83
_This Rust-based backend/web API connects to a PostgreSQL database. It uses Docker and Docker Compose for local development and deployment, including utilities for database management and migrations. You can run PostgreSQL locally (via Docker) or remotely by configuring environment variables._
133
84
134
-
<<<<<<< HEAD
135
-
### Quickstart
136
-
=======
137
85
---
138
86
139
87
### Building and Running Locally or Remotely in Containers
@@ -316,17 +263,6 @@ Remember to replace `<your-github-username>` with your actual GitHub username.
316
263
317
264
## Project Directory Structure
318
265
319
-
<<<<<<< HEAD
320
-
- `docs` - project documentation including architectural records, DB schema, API docs, etc.
321
-
- `domain` - layer of abstraction above `entity_api` and intended to encapsulate most business logic. Ex. interactions between `entity_api` and network calls to the outside world.
322
-
- `entity_api` - data operations on the various `Entity` models
323
-
- `entity` - shape of the data models and the relationships to each other
324
-
- `migration` - relational DB SQL migrations
325
-
- `scripts` - contains handy developer-related scripts that make working with this codebase more straightforward
- `src` - contains a main function that initializes logging and calls all sub-services
328
-
- `web` - API endpoint definition, routing, handling of request/responses, controllers
329
-
=======
330
266
`docs` - project documentation including architectural records, DB schema, API docs, etc
331
267
332
268
`domain` - Layer of abstraction above `entity_api` and intended to encapsulate most business logic. Ex. interactions between `entity_api` and network calls to the outside world.
@@ -391,4 +327,3 @@ Note that to generate a new Entity using the CLI you must ignore all other table
391
327
```bash
392
328
DATABASE_URL=postgres://refactor:password@localhost:5432/refactor_platform sea-orm-cli generate entity -s refactor_platform -o entity/src -v --with-serde both --serde-skip-deserializing-primary-key --ignore-tables {table to ignore} --ignore-tables {other table to ignore}
0 commit comments