👨💻 Local Environment
IMPORTANT
Your local ${USER} variable is important to us. It helps us create separated local environments while still allowing you to use cloud infrastrure without conflicts. You will notice a number of things are created with your ${USER} name.
Try to keep it constant through your adventure at Tellia
Prerequisites
- Install
git
brew install gitBackend
Prerequisites
- Clone the repository
git clone https://github.com/maisonbleue/agri_backend- Install packages.
Run the setup script to prepare your local development environment:CAUTION
Only MacOS supported
bashcd agri_backend ./dev/scripts/setup.shOr install manually these packages
- Docker - Docker compose - MongoDB Compass (optional but recommended) - Node.js `22` (we recommend using NVM to manage NodeJS versions) - [1password desktop](https://1password.com/downloads/) - Install dependencies
npm install.env
Setup your local env file from 1password desktop application.
Open settings

Set
Show 1Password Developer experience
In
DeveloperClickView Environment
Select
backend-local
Click Configure destination

- Check file is present
ls /Users/${USER}/Documents/Git/tellai/agri_frontend/.env
# /Users/acouty/Documents/Git/tellai/agri_frontend/.envStarting Services
Start the local development environment. This will deploy a stack of several services used by the teal for testing, debugging and so on.
# Starts docker containers in the background
docker-compose up -dConnecting to MongoDB
Use MongoDB Compass with the following connection string:
mongodb://user:pass@localhost:27017/?authSource=admin&directConnection=trueLocal database seed
WARNING
This will copy the production database to your local environment!
Create or refresh your development database:
# Standard, will only download once
./dev/scripts/create-user-db.sh
# Force re-sync with production
./dev/scripts/create-user-db.sh --dumpStart the backend
Your favorite IDE must be base on vscode.
- Run the
🍃 Backenddebugging configuration. - Validate start
curl http://localhost:3888
# Hello World%Alternatively you can you the command line:
npm run start:devFrontend
Prerequisites
- Clone the repository
git clone https://github.com/maisonbleue/agri_frontend- Install dependencies
npm installSetup .env
CAUTION
It seems the dev setup does not allow env variables to be loaded correctly from 1password mounted file.
Use 1password to edit & sync dev .env, but keep it disabled for now
- Set
.envfile Follow previouw steps with 1password to setup fyour.envfile. - After set up, copy the
.envfile - Disable 1password sync
- Re-create the
.envwith the previously copied content
Start the frontent
Your favorite IDE must be base on vscode.
- Run the
🍃 Backenddebugging configuration. - Validate start
curl http://localhost:3888
# Hello World%Alternatively, run
npm run devTroubleshooting
- Ensure all required environment variables are set
- Check Docker is running
- Verify network ports are not conflicted
Next steps
- Play with Tellia
- Check the Observability section, your local development is automatically monitored !