Documentation Index
Fetch the complete documentation index at: https://docs.cocobase.cc/llms.txt
Use this file to discover all available pages before exploring further.
Project Settings
Every project has a Settings page where you control credentials, team members, authentication behavior, and environment variables for cloud functions. How to get there:| Tab | What’s in it |
|---|---|
| General | Project name, API key, allowed origins (CORS) |
| Team | Invite teammates, manage access |
| Configs | Auth behavior, email URLs, environment variables |
General Tab
API Key
Your project’s API key authenticates every SDK and HTTP request from your app. It must be sent in theX-API-Key header.
- Click Copy to copy the key to clipboard
- Click Regenerate to rotate to a new key (the old key stops working immediately)
Allowed Origins (CORS)
Controls which domains are allowed to call your Cocobase API from a browser.- Add every domain your frontend runs on
- Include
http://localhost:PORTfor local development - Wildcards (
*) are not supported — list each origin explicitly - Mobile apps and server-side code don’t need CORS (add them anyway if you see errors)
- Type the full URL (including
https://) into the input - Click Add or press Enter
- Click Save
Team Tab
Invite a Teammate
- Enter the teammate’s Cocobase account email
- Click Invite
- They appear in the team list immediately — they’ll see the project in their dashboard
Remove a Teammate
Click the trash icon next to their name. They lose access immediately.Leaving a Project (teammates only)
If you’re a teammate (not the owner), you’ll see a Leave button on the project row in your dashboard:Configs Tab
- Project configuration — built-in settings that control Cocobase behavior
- Environment variables — custom key/value pairs for your cloud functions
Project Configuration
These are the built-in config keys. You can set them with the toggles and inputs in the dashboard, or read them fromconfig.get("KEY") inside cloud functions.
Auth
JWT_EXPIRY_MINUTES
| Value | Meaning |
|---|---|
60 | 1 hour |
1440 | 1 day |
2880 | 2 days (default) |
43200 | 30 days |
ENABLE_2FA
OTP_LENGTH. Users can individually opt out of 2FA on their account (if you allow it).
ENABLE_PHONE_LOGIN
ENABLE_EMAIL_VERIFICATION
email_verified is false.
Pair with VERIFICATION_URL to point users to your own verification page, or leave it blank to use the Cocobase-hosted one.
OTP_LENGTH
4 for shorter codes (friendlier UX), 8 or 10 for higher security.
ALLOWED_SELF_ROLES
user and seller to be self-assigned:
admin, moderator) can only be assigned server-side via cloud functions or the dashboard.
SEND_WELCOME_EMAIL
post_register hook.
FRONTEND_URL
https://myapp.com). Used as a fallback when more specific URL configs are not set, and included in email templates as a “go to app” link.
Set this first — the other URL configs fall back to it.
VERIFICATION_URL
ENABLE_EMAIL_VERIFICATION on, Cocobase sends them a link:
token query param and call the verification endpoint. If not set, falls back to FRONTEND_URL, then to the Cocobase-hosted verification page.
Example: https://myapp.com/verify-email
VERIFICATION_SUCCESS_URL
https://myapp.com/welcome
LOGIN_URL
https://myapp.com/login
PASSWORD_RESET_URL
https://myapp.com/reset-password
Environment Variables
config.get("MY_KEY").
- Keys are auto-uppercased and spaces become
_ - Values are masked by default (click the eye icon to reveal)
- Keys that match a built-in config name are rejected — use the Config section above for those
- Changes take effect on the next function execution (no restart needed)
