Comment on page
There are 2 recommend ways of structuring your project:
- 1.In a mono-repo approach - all the files will be structured in a single directory.
- 2.In a multi-repo approach - the files will be structured in two distinct directories - a
This approach makes it easy to structure your project based on your team's needs.
A possible structure for a mono-repo approach can be:
│ ├── .env
│ ├── models/
│ ├── node_modules/
│ ├── package.json
│ └── index.ts
Generally, genezio commands should be executed at path where
Hence, commands such as
genezio localwill be executed in the project's directory.
Genezio is implementing the concept of workspaces, so you can add in the
genezio.yamlthe paths to the corresponding server and client directories:
A possible structure for a multi-repo approach can be:
serverdirectory you can add the source code related to the backend.
clientdirectory you can add the source code related to the frontend. Usually, you will find the SDK saved here because conceptually the client needs to know how to call the backend methods. You can change the location where the SDK is saved in
In genezio, a backend is composed of one or multiple classes. A class contains a set of methods. The methods can be called either directly or by using the SDK that is automatically generated on deployment and when using the local environment. There are three types of methods: