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: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contributing
2
2
3
-
Here are some short guidelines to guide you if you want to contribute to the development of the Full Stack FastAPI PostgreSQL project generator itself.
3
+
Here are some short guidelines to guide you if you want to contribute to the development of the Full Stack FastAPI MongoDB project generator itself.
4
4
5
5
After you clone the project, there are several scripts that can help during development.
Copy file name to clipboardExpand all lines: {{cookiecutter.project_slug}}/README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,24 @@ If your Docker is not running in `localhost` (the URLs above wouldn't work) chec
39
39
40
40
## Backend local development, additional details
41
41
42
+
### Setting Up MongoDB
43
+
44
+
**The backend and celery containers will fail to load if a proper Mongo URI is not configured**.
45
+
46
+
Please ensure that either
47
+
-`MONGO_(HOST|USER|PASSWORD|DATABASE)` were properly set in the initial MongoDB setup phase
48
+
-`MONGO_DATABASE_URI` has been set in `{{ cookiebutter.project_slug }}/.env`
49
+
50
+
To learn more about how to generate a MongoDB URI please look at the docs on [Connecting to your MongoDB Atlas Clutser](https://www.mongodb.com/docs/atlas/tutorial/connect-to-your-cluster/)
51
+
52
+
### Setting Up MongoDB Locally
53
+
54
+
**Currently, the FARM-stack generator does not provide a running `mongod` within the docker container**
55
+
56
+
If running a local instance of MongoDB outside of a docker container that you want your backend to communicate with, you will need to set up [port forwarding in your docker config](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds). Since the intention of this generator is to work with scalable production environments very quickly, providing a local container of MongoDB was not part of the initial charter in its creation. **We do strongly advise you connect to an Atlas cluster**
57
+
58
+
To see how to use MongoDB with Docker, read through this article on [set-up steps](https://www.mongodb.com/compatibility/docker)
59
+
42
60
### General workflow
43
61
44
62
By default, the dependencies are managed with [Hatch](https://hatch.pypa.io/latest/), go there and install it.
@@ -62,7 +80,7 @@ Next, open your editor at `./backend/app/` (instead of the project root: `./`),
62
80
$ code .
63
81
```
64
82
65
-
Modify or add SQLAlchemy models in `./backend/app/app/models/`, Pydantic schemas in `./backend/app/app/schemas/`, API endpoints in `./backend/app/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/app/crud/`. The easiest might be to copy the ones for Items (models, endpoints, and CRUD utils) and update them to your needs.
83
+
Modify or add beanie models in `./backend/app/app/models/` (make sure to include them in `MODELS` within `.backend/app/app/models/__init__.py`), Pydantic schemas in `./backend/app/app/schemas/`, API endpoints in `./backend/app/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/app/crud/`. The easiest might be to copy the ones for Items (models, endpoints, and CRUD utils) and update them to your needs.
66
84
67
85
Add and modify tasks to the Celery worker in `./backend/app/app/worker.py`.
That will use the file `cookiecutter-config-file.yml` in the current directory (in this project) to generate a new project inside a sibling directory `project-copy`.
0 commit comments