Skip to content

Commit f61c08b

Browse files
committed
merges remaining changes from main.
1 parent 392dcc6 commit f61c08b

File tree

3 files changed

+0
-75
lines changed

3 files changed

+0
-75
lines changed

README.md

-65
Original file line numberDiff line numberDiff line change
@@ -54,63 +54,14 @@ The platform itself is useful for professional independent coaches, informal men
5454

5555
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.
5656

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-
CREATE DATABASE refactor_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-
CREATE USER refactor WITH PASSWORD 'password';
76-
-- create a new schema owned by user `refactor`
77-
CREATE SCHEMA IF NOT EXISTS refactor_platform AUTHORIZATION refactor;
78-
-- check to see that the schema `refactor_platform` exists in the results
79-
SELECT schema_name FROM information_schema.schemata;
80-
-- 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
10257
## Starting the Backend
10358

10459
To run the backend directly outside of a container:
10560

10661
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`.
10762

10863
```bash
109-
<<<<<<< HEAD
110-
cargo run -- -l DEBUG -d postgres://refactor:password@localhost:5432/refactor_platform
111-
=======
11264
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
11465
```
11566

11667
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
13182

13283
_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._
13384

134-
<<<<<<< HEAD
135-
### Quickstart
136-
=======
13785
---
13886

13987
### Building and Running Locally or Remotely in Containers
140-
>>>>>>> main
14188

14289
1. **Install Prerequisites**:
14390
- [Docker](https://www.docker.com/products/docker-desktop) (20+)
@@ -316,17 +263,6 @@ Remember to replace `<your-github-username>` with your actual GitHub username.
316263
317264
## Project Directory Structure
318265
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
326-
- `service` - CLI flags, environment variables, config handling, and backend daemon setup
327-
- `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-
=======
330266
`docs` - project documentation including architectural records, DB schema, API docs, etc
331267
332268
`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
391327
```bash
392328
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}
393329
```
394-
>>>>>>> main

entity_api/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@ log = "0.4.22"
1414
axum-login = "0.17.0"
1515
async-trait = "0.1.83"
1616
password-auth = "1.0.0"
17-
<<<<<<< HEAD
18-
sqlx = { version = "0.8.3", features = ["time", "runtime-tokio"] }
19-
utoipa = { version = "5.3.1", features = ["axum_extras", "uuid"] }
20-
=======
2117
slugify = "0.1.0"
2218
sqlx = { version = "0.8.2", features = ["time", "runtime-tokio"] }
2319
sqlx-sqlite = { version = "0.8.2" }
2420
utoipa = { version = "4.2.0", features = ["axum_extras", "uuid"] }
25-
>>>>>>> main
2621

2722
[dependencies.sea-orm]
2823
version = "1.1.0" # sea-orm version

web/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ edition = "2021"
99
domain = { path = "../domain" }
1010
service = { path = "../service" }
1111

12-
<<<<<<< HEAD
13-
axum = "0.8.1"
14-
axum-login = "0.17.0"
15-
=======
1612
axum = "0.7.7"
1713
axum-login = "0.16.0"
1814
chrono = { version = "0.4.38", features = ["serde"] }
19-
>>>>>>> main
2015
log = "0.4.22"
2116
tower-http = { version = "0.6.1", features = ["fs", "cors"] }
2217
serde_json = "1.0.128"

0 commit comments

Comments
 (0)