Sean Edmunds b8eedde727
All checks were successful
Deploy to production / build (push) Successful in 11s
Bug fix
2026-07-14 16:50:33 -05:00
2026-02-06 14:01:31 -06:00
2025-04-07 23:12:55 -05:00
2026-07-14 16:50:33 -05:00
2025-04-22 15:14:47 -05:00
2025-06-19 14:38:27 -05:00
2025-06-20 13:56:00 -05:00
2026-01-28 14:27:27 -06:00
2026-07-09 16:56:13 -05:00
2026-07-13 14:30:56 -05:00
2026-07-13 14:30:56 -05:00
2026-05-19 20:31:14 -05:00
2026-07-13 14:30:56 -05:00
2026-07-09 15:44:47 -05:00

Table of Contents

Trigger Home Page

A homepage replacement for your browser built on React and SQL.

Prerequisite Setup

  • Install MariaDB/MySQL

  • Install Git

  • Install Node 20+

Navigate to the TriggerFrontend and TriggerBackend folders and run:

  • npm install

  • If you encounter errors installing, try adding --legacy-peer-deps

WARNING !!!

Trigger does not handle authentication of any kind. It is designed to be used behind a reverse proxy, such as NGINX, or other service that can request authentication prior to serving the page. An basic NGINX example file can be found in the root.

MariaDB/MySQL setup

Connect to your server:

sudo mariadb

Create the database and new administration user:

create database trigger_database;

grant all privileges on trigger_database.* TO 'triggeradmin'@'localhost' identified by 'trigger';

flush privileges;

⚠️ Update the above grant line to use a username and password other than the default. ⚠️

Import defaultDatabase.sql into your database server using your preferred management application or run the following via the terminal:

sudo mariadb -u triggeradmin -p trigger_database < defaultDatabase.sql

Configuration

Clone both the TriggerFrontend and TriggerBackend repositories. They do not need to be run from the same folder, or even the same machine.

Trigger uses .env files to configure the connection to the database as well as the base url for the application. Prior to running or building the app, you will need to edit the file at TriggerBackend/.env and TriggerFrontend/.env to match your environment.

Make a copy of the example file:

cp TriggerFrontend/.env.example TriggerFrontend/.env
cp TriggerBackend/.env.example TriggerBackend/.env

⚠️ Update the following fields to match your environment's URLs and credentials. The Domains and Base URL here must be defined without leading or trailing '/'! ⚠️

Frontend .env.example

VITE_DOMAIN_DEV='http://localhost:5000'
VITE_DOMAIN_PROD='https://domain.local'
VITE_BASE_URL='trigger'

Backend .env.example

DB_HOST='127.0.0.1'
DB_USER='triggeradmin'
DB_PASS='trigger'
DB_PORT='3306'
API_PORT='5000'
API_URI='trigger'

Run/build

To run the application without building:

npm run dev

To build the application for production:

npm run build

Run with pm2:

sudo npm install -g pm2

cd TriggerFrontend/
sudo pm2 serve ./dist --no-daemon --spa --port 3000

cd ..

cd TriggerBackend/
sudo pm2 start server.cjs

TODO

  • Mobile improvements
  • New Carosel on weather description
  • Updates to weather modal
  • Reivew Mantine v9 for changes
Description
React/TS front end for Trigger homepage
Readme 27 MiB
Languages
TypeScript 94.3%
CSS 5.6%