Team work¶
A team shares one Git repository. Each developer works in an account of their own, on databases of their own, and pushes to a branch for a pull request. Or several developers sync one account at the same time, from their editors. The admin panel helps with both.
In short
- The root user makes one account per developer, each with its own API path.
- Database names that differ on a machine are masked, so the code stays the same.
- Up to 50 local clients can sync one account at the same time.
Developer accounts¶
One admin user per developer. Each developer signs in with their own account, pulls the branch of the team, works, and pushes. The APIs of each account answer under its own user path.
| Who creates them | The root user, on the Accounts page : name, email, API path, password, active. Insert Default Data (checked by default) adds sample custom APIs, schemas, hooks and migration scripts ; the default secret, group and API user are made either way. Clone copies one. |
| Unique | The API path and the email. |
| Own to each account | Its secrets, its Git branch and credentials, its masked database names, its sandbox processes, its Redis cache. |
| Shared | The Git repository, and through it every item of the project. |
| From a script | The management API creates, changes and deletes admin users. |
A developer joins :
- The root user creates the account and gives the credentials.
- The developer sets the Git URL and commit email in their User info, pulls the branch of the team, and adds the connection strings and keys of their own databases to their secret.
- When the database names of their machine differ from the ones in the code, they mask them.
- They work under
/api/…/<their path>/…, test with their own API users, and push to a branch of their own for a pull request.
Several developers on one account¶
Several developers can work on the same account at the same moment, each in their own editor : every one runs the local client with the sync token of the account.
| How many | Up to 50 local clients of an account at a time. |
| What travels | What one of them saves reaches the others and the admin panel within a second, as the server saved it. Each line of their terminals says who made the change. |
| Who is connected | The bar of the admin panel shows the local clients of the account : their faces and their count, then, in its menu, each computer, folder and address, and since when. |
| Security | Each one connects encrypted and proves the sync token without sending it ; a new sync token disconnects all of them. |
Mask database names¶
The code names the databases the way production does : shop. On a developer machine the same database may be shop_dev, or two developers may share one server with shop_alice and shop_bob. Masking maps one to the other, for one account, so nobody edits a database name before a pull request.
| Where | Profile → User info → masked databases : instance, database name, masked database name. |
| Scope | The account of the developer only. Git, schemas, settings and code keep the name of the project. |
| Effect | Every API, hook, migration and query of the account runs on the masked name : the name in the URL and in the code stays the one of the project. |
| Instance | Database name (in the code) | Masked database name (on this server) |
|---|---|---|
mysql8 |
shop |
shop_alice |
- Add one row per database whose name differs. Names not listed are used as they are.
- Table meta, migrations, and plain queries which name the database in the API also go through the mapping ; SQL text you write yourself does not.
Compare code¶
The Git panel lists every item the account changed since the last pull, with its kind of change, and opens each one in a compare editor.
| Where | The Git panel → Git status of commit. |
| Per file | Compare or Open in compare editor : the version of the branch next to the version of the account, the differences highlighted line by line. |
| All at once | View all changes in one diff. |
| Undo | Revert puts the file back to the branch ; several files at once with Revert selected. |
- The versions of a custom API, a hook or a listener are files of the item in Git, so a change of version shows in the same list.