This repository implements a NodeJS API server to communicate with Trello and a web app made with Svelte, the communication from the front-end to the Trello API is only allowed through the back-end API.
The main architecture and tooling is built on top of homegrown utilities of my own.
server.js
— Our NodeJS application
static.json
— Settings for the web-server on Heroku
Procfile
— Custom web:
process for running Nginx + NodeJS
api/
— Here we setup our API handlers.js
and routes.js
controllers/
— Use provider.js
files to inject dependenciesmailings/
— Pug templates and LESS stylesheets for the mailingsE-mail sent by the application can be accesed through the /email endpoint.
app/
— Web app sources, i.e. the main.js
is the entry-pointcomponents/
— Svelte components on the wild!resources/
— Files found in sprites/
are used as <SvgIcon />
shared/
— Utility functions and shared stateI prefer to work with Svelte over React or Vue. It's easy to grasp and helps you get stuff done quickly!
The following buildpacks are required:
Deployments are done by running
git push heroku main
The following variables are required on the server, e.g.
MAILDEV=YES
TRELLO_API_KEY=XXX
Either
export
'ed, on a.env
file or added throughheroku config:add
Execute make
in your terminal, it'll setup the dependencies and start the services.
Maildev should be enabled by default since it's just for demo purposes, otherwise you must configure it.