No description
Find a file
2026-01-28 19:38:42 +01:00
.vscode wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
npm-scripts wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
public Add static website with simple api-server to send mails 2026-01-28 07:13:31 +01:00
src wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
.gitignore Add static website with simple api-server to send mails 2026-01-28 07:13:31 +01:00
docker-compose.yml wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
Dockerfile wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
Makefile Add static website with simple api-server to send mails 2026-01-28 07:13:31 +01:00
package-lock.json Add static website with simple api-server to send mails 2026-01-28 07:13:31 +01:00
package.json wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
README.md wip: adjusted nodemailer init & config, added debbuger for dev setup 2026-01-28 19:38:42 +01:00
tsconfig.json Add static website with simple api-server to send mails 2026-01-28 07:13:31 +01:00

Finalytix website static

Uses a static html utilizing Bootstrap template Agency and minimal frontend Javascript to send a message which gets forwarded as mail to info@finalytix.de.

Getting Started

## build the typescript sources to /dist
npm run build
## run the development server locally with nodemon
npm run dev
## run the server for production setup
npm run start

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying public/index.html and corresponding frontend script public/js/scripts.js. Furhter adjustments on the api server will auto-deploy through nodemon.

Todos

  • initialize git flow (terminal tool) and change to develop (protect main branch?)
  • connect nodemailer to finalytix mail-service
    • progress made but tackled some smtp related issues
  • add nodeinstpector to npm run dev setup to debug server code
  • test and enhance Dockerfile & docker compose usage
  • add sanitizer to all uploaded data (/users/create, /contact, etc) to prevent INJECTIONS
  • extract auth-routes in separate authentication-api using a common-lib
  • extract auth-middleware in separate common library common-lib to keep it resuable (NPM or Gitlab pkg ?)
    • see: https://stackoverflow.com/a/27015550
    • add userDB to store new contact as user
    • add invoiceDB to store contact messages
    • add blacklist with 24h auto-removal based on ip to avoid spam / DDOS (Treafik or common-lib ?)
    • add logging with proper log-level (winston?) and compatible with graylog
  • add frontend bundler like vite, rollup or webpack with proper tree-shaking
  • add testing setup with nyc, mocha, supertest, nock?

Further topics

  • check upgrade auf next.js ?
  • rebuild frontend with reactjs + tailwind

Testing the api routes

## example to create a message request
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"name":"xyz","phone":"123", "email": "abc@ork.io", "message": "Aaaargh!"}' \
  http://localhost:3000/api/contact

## example to create a user
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"username":"xyz","email":"abc@ork.io"}' \
  http://localhost:3000/api/user/create