This repository contains both the frontend and backend (Google Cloud Functions) code for the Alldone app.
Ensure you have the following dependencies installed with the specified versions:
- Node.js v14.21.3
(We recommend using a Node version manager likenvm.) - npm v6.14.18
(Normally installed along with Node.js.) - expo-cli v6.1.0
(npm install -g expo-cli@6.1.0) - firebase-tools v13.29.3
(npm install -g firebase-tools@13.29.3)
The project is configured for GitLab CI/CD using the .gitlab-ci.yml file.
If you want to use a different CI/CD platform (such as GitHub Actions, Bitbucket Pipelines, or CircleCI), you will need to create your own configuration files. You can refer to the existing setup as a starting point, but some adjustments may be necessary.
Note:
If you are contributing to the main Alldone app, you can skip this section.
If you plan to deploy your own instance of the app, please continue reading.
The Alldone app relies on several external services. To run your own instance, you must create accounts and configure these services as outlined below.
Alldone uses Algolia for search functionality and user mentions.
You can create an account at Algolia.
Algolia offers a free tier with limited resources, but for production, we recommend the Pay-as-you-go plan.
You should create two separate accounts, one for staging and other for production
To run the app locally, add the following variables:
ALGOLIA_APP_IDALGOLIA_SEARCH_ONLY_API_KEY
Add these to:
.env(current environment)envs/env.developenvs/env.master
Add these variables to GitLab CI/CD:
ALGOLIA_APP_ID_DEVALGOLIA_SEARCH_ONLY_API_KEY_DEVALGOLIA_APP_ID_PRODALGOLIA_SEARCH_ONLY_API_KEY_PROD
To support functions, include the following in each environment:
ALGOLIA_APP_IDALGOLIA_ADMIN_API_KEY
Add these to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
Note: The
.envfile must match the currently active environment.
Alldone uses Google Analytics and Google Ads for tracking, as well as Google Tag Manager for event and conversion management.
Add the following variables:
GOOGLE_ANALYTICS_KEYGOOGLE_ADS_GUIDE_CONVERSION_TAG
Add these to:
.env(current environment)envs/env.developenvs/env.master
Add these variables to GitLab CI/CD:
GOOGLE_ANALYTICS_KEY_PRODGOOGLE_ADS_GUIDE_CONVERSION_TAG_PROD
To support analytics tracking in serverless functions, include:
GOOGLE_ANALYTICS_KEYGOOGLE_ANALYTICS_MEASURE_PROTOCOL_API_SECRET
Add these to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
To enable analytics tracking in Firebase Messaging, set:
measurementId
Add it to:
firebase-messaging-sw.js
To integrate Google Tag Manager, add the tag ID in the following format:
<!-- Script -->
gtmFn(window, document, 'script', 'dataLayer', '[GTM-ID]')
<!-- Noscript -->
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-THM5BX5"
height="0"
width="0"
style="display:none;visibility:hidden"
></iframe
></noscript>
Where GTM-ID is your Google Tag Manager idAlldone uses Firebase for authentication, real-time database access, storage and other functionalities.
You can manage your project at Firebase Console.
To run the app locally, add the following variables:
GOOGLE_FIREBASE_WEB_CLIENT_IDGOOGLE_FIREBASE_WEB_API_KEYGOOGLE_FIREBASE_DEPLOY_TOKENGOOGLE_FIREBASE_WEB_APP_IDGOOGLE_FIREBASE_WEB_AUTH_DOMAINGOOGLE_FIREBASE_WEB_DATABASE_URLGOOGLE_FIREBASE_STORAGE_BUCKETGOOGLE_FIREBASE_WEB_NOTES_STORAGE_BUCKETGOOGLE_FIREBASE_WEB_MESSAGING_SENDER_IDGOOGLE_FIREBASE_WEB_PROJECT_ID
Add these to:
.env(current environment)envs/env.developenvs/env.master
Add these variables to GitLab CI/CD:
GOOGLE_FIREBASE_WEB_CLIENT_ID_DEVGOOGLE_FIREBASE_WEB_CLIENT_ID_PRODGOOGLE_FIREBASE_WEB_API_KEY_DEVGOOGLE_FIREBASE_WEB_API_KEY_PRODGOOGLE_FIREBASE_DEPLOY_TOKENGOOGLE_FIREBASE_WEB_APP_ID_DEVGOOGLE_FIREBASE_WEB_APP_ID_PRODGOOGLE_FIREBASE_WEB_AUTH_DOMAIN_DEVGOOGLE_FIREBASE_WEB_AUTH_DOMAIN_PRODGOOGLE_FIREBASE_WEB_DATABASE_URL_DEVGOOGLE_FIREBASE_WEB_DATABASE_URL_PRODGOOGLE_FIREBASE_STORAGE_BUCKET_DEVGOOGLE_FIREBASE_STORAGE_BUCKET_PRODGOOGLE_FIREBASE_WEB_NOTES_STORAGE_BUCKET_DEVGOOGLE_FIREBASE_WEB_NOTES_STORAGE_BUCKET_PRODGOOGLE_FIREBASE_WEB_MESSAGING_SENDER_ID_DEVGOOGLE_FIREBASE_WEB_MESSAGING_SENDER_ID_PRODGOOGLE_FIREBASE_WEB_PROJECT_ID_DEVGOOGLE_FIREBASE_WEB_PROJECT_ID_PROD
To support functions, include the following in each environment:
GOOGLE_FIREBASE_WEB_CLIENT_IDGOOGLE_FIREBASE_DEPLOY_TOKENGOOGLE_FIREBASE_WEB_NOTES_STORAGE_BUCKET
Add these to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
In the firebase-messaging-sw.js file, include:
apiKeyappIdauthDomaindatabaseURLmessagingSenderIdstorageBucket
In the google-services.json file, include:
client_idfirebase_urlproject_number
Alldone uses SendinBlue for transactional emails and marketing communication services.
You can learn more at SendinBlue.
To run the app locally with SendinBlue, add the following variables:
SIB_API_KEYSIB_MARKETING_SERVICE_LIST
Add these to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variables to GitLab CI/CD:
SIB_API_KEYSIB_MARKETING_SERVICE_LIST_DEVSIB_MARKETING_SERVICE_LIST_PROD
To support functions, include the following in each environment:
SIB_API_KEY
Add this to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
Alldone uses Sentry for error monitoring and performance tracking.
You can learn more at Sentry.
To run the app locally with Sentry, add the following variable:
SENTRY_DSN
Add this to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variable to GitLab CI/CD:
SENTRY_DSN
Alldone uses OpenAI for AI-powered features and automation.
You can learn more at OpenAI.
To support functions, include the following variable in each environment:
OPEN_AI_KEY
Add this to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
Alldone integrates Perplexity for advanced AI query capabilities.
Learn more at Perplexity.
To run the app locally with Perplexity, add the following variable:
PERPLEXITY_API_KEY
Add this to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variable to GitLab CI/CD:
PERPLEXITY_API_KEY
To support functions, include the following variable:
PERPLEXITY_API_KEY
Add this to:
env_functions.jsonenv_functions_master.jsonenv_functions_dev.json
Alldone uses the Quill editor for creating notes and tasks, enabling rich text and embedded content.
We’ve made custom modifications to the Quill library to support our specific use cases.
After installing Quill, replace the default file with the modified version:
- Copy:
replacement_node_modules/quill/dist/quill.js - Replace:
node_modules/quill/dist/quill.js
Quill supports real-time collaborative editing, allowing multiple users to edit a note simultaneously.
To enable collaboration, you can use one of the following public signaling servers:
wss://signaling.yjs.devwss://y-webrtc-signaling-eu.herokuapp.comwss://y-webrtc-signaling-us.herokuapp.com
⚠️ These public servers may become unavailable. For long-term use, we recommend hosting your own.
You can run your own signaling server. We provide a reference implementation here:
Collaboration Server Repo
This implementation is designed for Google App Engine but can be adapted for other environments.
If using your own server, update the environment configurations accordingly.
To support collaboration locally, add the following variable:
NOTES_COLLABORATION_SERVER
Add this to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variable to GitLab CI/CD:
NOTES_COLLABORATION_SERVER
Alldone uses a repository mirror to GitHub to provide free public access to the codebase.
If you're setting up your own instance, you likely won't need this functionality.
However, if you wish to replicate your repository to GitHub, the integration is already configured and ready to use.
You can learn more at GitHub.
To run the app locally with GitHub integration, add the following variables:
GITHUB_TOKENGITHUB_USER
Add these to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variables to GitLab CI/CD:
GITHUB_TOKENGITHUB_USER
Alldone uses ipregistry to handle geolocation.
You can learn more at Ipregistry.
To run the app locally, add the following variables:
IP_REGISTRY_API_KEY
Add these to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variables to GitLab CI/CD:
IP_REGISTRY_API_KEY
Alldone uses Giphy to handle gif animations.
You can learn more at Giphy.
To run the app locally, add the following variables:
GIPHY_API_KEY
Add these to:
.env(current environment)envs/env.developenvs/env.master
For staging and production environments, add the following variables to GitLab CI/CD:
GIPHY_API_KEY_DEVGIPHY_API_KEY_PROD
Alldone uses Mollie to handle premium subscription payments.
Alldone is free to use under a non-commercial license.
If you wish to use Alldone for commercial purposes, you must first contact us to reach an agreement.
If granted permission for commercial use, you can use the current premium payment system. You’ll need to configure the Mollie integration as described below.
To enable Mollie in functions, add the following environment variable:
MOLLIE_API_KEYMOLLIE_WEBHOOKMOLLIE_SEND_MONTHLY_INVOICE
Add this to:
.envenv_functions.jsonenv_functions_master.jsonenv_functions_dev.json
If you're not using Alldone commercially or prefer not to integrate payments, you can disable premium features:
Replace the PremiumTab with a placeholder tab.
⚠️ We do not recommend removing it, as some links may point to it, which could cause runtime errors. This is why you need to replace the tab only.
You’ll find the component here:
components/Premium/PremiumTab.js- Referenced in:
SettingsViewcomponent
To make all users premium by default:
- Locate the
getNewDefaultUserfunction. - Update the
premiumentry:
premium: { status: PLAN_STATUS_PREMIUM },
#### Alternative: Manually Set Premium Users and Remove Cloud Functions
Alternatively, you can manually update specific users in the database to have premium access:
- Go to the `users` collection.
- Set the field `premium.status` to `premium` for any user you want to treat as premium.
---
You can also remove premium-related **Google Cloud Functions** to reduce costs.
> ⚠️ This is optional and should only be done if you’ve replaced or disabled the `PremiumTab`.
The following functions can be safely removed:
- `updateCreditCardNumberSecondGen`
- `createCompanySubscriptionSecondGen`
- `removeUserFromSubscriptionSecondGen`
- `addedPaidUsersToSubscriptionSecondGen`
- `addedPaidUsersWhenActivateSubscriptionSecondGen`
- `removePaidUsersFromSubscriptionSecondGen`
- `addedUsersToSubscriptionSecondGen`
- `addedUsersWhenActivateSubscriptionSecondGen`
- `cancelSubscriptionSecondGen`
- `webhookSecondGen`
- `webhook`
- `updateMollieSubscription`
- `sendMonthlyInvoiceSecondGen`
- `sendMonthlyInvoice`
- `resetUserFreePlanSecondGen`
- `autoCancelSubscriptionsSecondGen`
## 4. Alldone company data
> **Note:**
> If you are contributing to the main Alldone app, you can skip this section.
> If you plan to deploy your own instance of the app, please continue reading.
The codebase includes references to company-specific data related to Alldone.
If you're setting up your own instance, make sure to search for and replace these values with your own company information.
Below is a list of placeholders you should look for and update accordingly:
- `Karsten`
- `Wysk`
- `Karsten@AllDone.app`
- `karsten@alldone.app`
- `Kolonnenstr. 8 10827 Berlin`
- `Alldone GmbH`
- `HRB 214608B`
- `30 205 51005`
- `DE334674051`
- `CEO Alldone.app`
Be thorough when replacing these values to ensure your deployment is fully customized and legally compliant.
Check the files `.env.alldonealeph` and `.env.alldonestaging`
## 5. Alldone hostings
> **Note:**
> If you are contributing to the main Alldone app, you can skip this section.
> If you plan to deploy your own instance of the app, please continue reading.
The codebase contains links pointing to the official Alldone application.
When deploying your own version, you should update these URLs to reflect your own domain and hosting setup.
Below is a list of placeholders to search for and replace:
- `https://mystaging.alldone.app`
- `alldone.app`
- `https://my.alldone.app/`
Make sure to review all environment files, configuration files, and hardcoded URLs to ensure your deployment points to your own infrastructure.We use Firestore as the primary database. For the initial setup, you'll need to manually add a few entries to Firestore:
- Create a document at the path:
roles/administrator - Inside the document, add a field called
userIdwith the ID of the admin user.
⚠️ The first time you run AllDone, a user document will be automatically created under theuserscollection.
You can find the ID of that user and manually set it in theroles/administratordocument.
You can later update the userId to assign administrator rights to a different user if needed.
We have two main environments configured, production and staging.
To run the app locally, add the following variables:
CURRENT_ENVIORNMENTHOSTING_URL
Add these to:
.env(current environment)envs/env.developenvs/env.master
Add these variables to GitLab CI/CD:
CURRENT_ENVIORNMENT_DEVCURRENT_ENVIORNMENT_PRODHOSTING_URL_DEVHOSTING_URL_PROD
To support functions, include the following in each environment:
CURRENT_ENVIORNMENTHOSTING_URL
Add these to:
.env.env.alldonestaging.env.alldonealeph
Note: The
.envfile must match the currently active environment.
To configure the service accounts for different environments, create the following files in your project directory:
serviceAccountKey.jsonserv_account_key_develop.jsonserv_account_key_master.json
Each file should contain the following JSON structure:
{
"type": "",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": ""
}
Be sure to fill in the correct credentials for each environment (e.g., development, staging, production).
These credentials are typically generated from your Google Cloud Console when creating a service account key.