📖 See the Remix docs and the Remix Vite docs for details on supported features.
gh repo clone localista/localistatouch .envTo add the necessary environment variables, ask a team member to add you to the infisical project.
Ask a team member for the contents of the .npmrc file.
npm installDownload Email Engine by following this link Once installed, you can run the following command to start the Email Engine server:
npm run emailengine # or emailengine --dbs.redis="redis://127.0.0.1:6379/0" --api.port=3001If you are prompted to enter a username and a password, you should be able to login with the following credentials:
username: admin
password: password
Otherwise you can follow the instructions on this link to set up the credentials
Email Engine offers a 14 day free trial. If your trial expires in development just flush your redis database to reset the trial.
redis-cli flushallTo receive webhooks from Email Engine, in the left navigation bar, click on
Webhook Routing > Create new:
- Give any name to the webhook
- You can leave the description blank
- the target URL should be
http://localhost:3001/webhooks/email - Check the box
Enable this Webhook Routing - In the filter function, copy/paste the following
/*
// The following example passes webhooks for new emails that appear in the Inbox of the user "testaccount".
// NB! Gmail webhooks are always emitted from the "All Mail" folder, not the Inbox, so we need to check both the path and label values.
const isInbox = payload.path === 'INBOX' || payload.data?.labels?.includes('\\Inbox');
if (payload.event === 'messageNew' && payload.account === 'testaccount' && isInbox) {
return true;
}
*/
const isInbox =
payload.path === 'INBOX' || payload.data?.labels?.includes('\\Inbox')
if (
(payload.event === 'messageNew' && isInbox) ||
payload.event === 'messageUpdated' ||
payload.event === 'trackOpen' ||
payload.event === 'trackClick'
) {
return true
}- in the map function copy/paste the following
// By default the output payload is returned unmodified.
return payloadUnder Configuration > Webhooks make sure the following checkboxes are checked:
Under Configuration > OAuth2, click on Create new > Gmail: Fill out the form
as you please and then ask a team mate for the configuration file for the OAuth2
credentials
npm run devYou can either use prisma studio for a better UX/UI
npx prisma studioOr you can run this command in the terminal
npm run cTo get the latest code, ideally you would rebase your branch from main instead
of merging main into your branch. This will keep your branch history clean and
easy to understand.
git status # clean status
git checkout main
git pull origin main
git checkout <your-branch>
git rebase main <your-branch>In case of conflicts, you will need to resolve them manually. Once resolved, you can continue the rebase process.
# resolve conflicts
git add .
git commit --no-edit
git rebase --continueThe seed file creates one client and one user. Look at the seed file to find
the credentials. Otherwise make sure to sign up and confirm your email. You will
receive the content of the confirmation email (along with the verification code)
in the server logs.
Background jobs are run on trigger.dev. Ask a team member to give you access to the trigger workspace
The app is automatically deployed when a branch is merged to main. Make sure
to create a pull request and don't merge directly to main