Skip to content

A portfolio website to host articles, apps, and games by Matthew Boyea.

License

Notifications You must be signed in to change notification settings

mboyea/www-mboyea-com

Repository files navigation

A portfolio website to host articles, apps, and games built by Matthew Boyea.

This website is built with SvelteKit, Sass, & Typescript to compile a html/css/js application delivered by a Node.js server. PNPM manages all dependency packages. Docker is used to compile the app into a minified Ubuntu environment. Fly.io hosts the Docker Image to serve the completed website.

Screenshot of home page.

Install (Windows)

  • Install Git Bash for deployment scripts & GitHub commits.
  • Install Node.
  • Install PNPM.
  • Install flyctl for deployments.
  • Install psql for remote SQL deployment.
  • Ensure each of the above command line tools are accessible by PATH.
  • Clone this repository to a directory on your computer. That directory will be referred to as root.
  • Open a terminal in root.
  • Run pnpm i in the terminal to install all remaining app dependencies. From here, you can use & edit the app locally on your Windows machine. See ### Run Scripts for more information.

Install (Arch Linux)

  • Install nodejs from pacman.
  • Install pnpm from pacman.
  • Install flyctl-bin from the AUR.
  • Install postgresql from pacman.
  • Clone this repository to a directory on your computer. That directory will be referred to as root.
  • Open a terminal in root.
  • Run pnpm i in the terminal to install all remaining app dependencies. From here, you can use & edit the app locally on your Arch Linux machine. See ### Run Scripts for more information.

Install (NixOS)

  • Add the nodePackages.pnpm flyctl postgresql packages to NixOS config or Home Manager config.
  • Run sudo nixos-rebuild switch home-manager switch.
  • Clone this repository to a directory on your computer. That directory will be referred to as root.
  • Open a terminal in root.
  • Run pnpm i in the terminal to install all remaining app dependencies. From here, you can use & edit the app locally on your Arch Linux machine. See ### Run Scripts for more information.

Run Scripts

To run a script, type pnpm run <script-name> into a terminal within the root folder.

script-name description
start run start:dev
start:dev create a local hot-reloading server at localhost:5173 to serve source code files
start:preview run build:preview, create a local server at localhost:4173 to serve built code files
build:preview build app using .env.development
build:prod build app using .env
deploy update app dependencies, run build:prod, run deploy:database, run deploy:secrets, run deploy:server
deploy:database update postgres users, databases, tables, procedures, etc.
deploy:secrets set flyctl secrets from .env file
deploy:server deploy build folder to flyctl
check evaluate Svelte syntax
check:watch re-evaluate Svelte syntax when files are updated
article cli to modify articles in the postgres database; pass -h for more details

Create Secrets

Some features of this app require secret database credentials. These secrets cannot be shared in public.

  • Obtain the secrets.
  • Create a file named .env in the root directory.
  • Copy the secrets into the .env file.
  • Repeat for file named .env.development.

Deploy

  • Install Dependencies.
  • Create Secrets.
  • Open a terminal in the root folder.
  • Run pnpm run deploy.
  • If postgres access is denied: check .env password; check .env host; check port 5432 is free (use netstat -ano | findstr :5432)

Contribute

Unfortunately, this project doesn't support community contributions right now. Feel free to fork, but be sure to read the license.