How can we (a mate and I) develop at the same time on forest admin?

Hi,

I just would like to know how can we (a mate and I) develop at the same time on forest admin?

Thanks

1 Like

Hi @Thomas :wave:t3:

If you would like to collaborate on the same project with another developer, we recommend creating a new development environment. You can create new environments only after having deployed for the first time your admin backend to a remote/production server.
The 2nd developer should of course have an account on Forest and should be a member of your project.

1. Creating a new development environment

To do so, go to your project settings

Choose a name and a backend URL and Forest Admin will generate a FOREST_ENV_SECRET for this newly created environment.

Once this is done, you need to configure the .env file in your colleague’s project directory.

APPLICATION_PORT=3311
DATABASE_URL= #your database URL
DATABASE_SCHEMA= #your schema
DATABASE_SSL= #true or false
NODE_ENV=development
FOREST_AUTH_SECRET= #random key chosen freely by you
FOREST_ENV_SECRET= #the secret key newly generated by Forest

2. Collaborating with a developer
Now comes the dev workflow, we recommend following these steps.

Step 1

Add the features to each of your admin backends locally. Test the features in the Forest UI of your development environments and configure the layouts to use it (each development environment has its layout). Version your code, including the updated version of the forestadmin-schema.json and the new features and push it to your staging environment (create one if possible, this is better than pushing straight to production).

Step 2

Have other users (e.g non-developers) test the new feature in staging. If the they are satisfied then push the code base to your production environment. In the Forest UI, copy the updated layout to your production environment.

Step 3

The new feature is available and the Forest UI is adapted for the users to use it in production.

To sum it up, you will both merge your backend code bases at the staging level and also collaborate on the same UI on the staging environment.

Hope this helps!

1 Like

Hi, thanks for your help, we could create a second env and run both the default development env and the new one side by side. However, now comes the multi developers access which requires a business plan, can you confirm we need that plan please?

Max

1 Like

Ok, we were able to deploy on heroku!

However, we aren’t able to figure out where to get the FOREST_AUTH_SECRET when creating a new environment (it was auto generated for the production env)

1 Like

Hi @Thomas :wave:

To answer your first question, our community plan allows for up to 10 users so you should find no problem inviting another developer to the project up to this limit. For more info, please check our pricing.

Do you confirm that you have deployed your admin backend to a remote heroku server and created a new development environment e.g admin backend url=http://localhost:3311?
The FOREST_AUTH_SECRET is a random key of your choice, simply add one to the .env file of your developer’s project directory. For more details on the .env configuration, check my earlier post.

Hey ! :slight_smile:

Alright, I just copied/pasted the AUTH key of another deployment and it worked :slight_smile:

thanks!

1 Like

Glad to hear that, safe hacking :raised_hands:t3: