Rebuilding my old personal website using preact and typescript.
- Pre-render components at build time for better SEO, faster FCP and support for disabled JS
- Serverless functions for fetching projects directly from a github profile & realtime error reporting
- Client-side caching to minimize network traffic
- Improved animation performance
- Monorepo architecture
Directory | Description |
---|---|
packages/ |
core application packages |
client/ |
preact frontend |
server/ |
serverless functions |
common/ |
shared logic and types |
scripts/ |
workflow scripts & githooks |
Start by cloning this repository:
git clone https://github.com/felixgro/felixgrohs.dev-v2.git
cd felixgrohs.dev-v2
Install & build all dependencies:
yarn
Boot up a local development server:
yarn dev:plain # only frontend, no serverless functions
Clone and rename .env.example
to .env
:
cp .env.example .env
Add your Github username and API token to the freshly cloned .env
file:
GITHUB_TOKEN=xyz
GITHUB_USER=felixgro
[Optional] Setup realtime error reporting using Mailersend by including your token along with your desired sending/receiving email address in the .env
file:
MAILERSEND_TOKEN=xyz
MAILERSEND_FROM=sending@example.com
MAILERSEND_FROM_NAME=Error-Reporter
MAILERSEND_TO=receiving@example.com
MAILERSEND_TO_NAME=Your Name
Boot up a local development server with all serverless functions:
yarn dev
Command | Description |
---|---|
dev |
Run development, HMR server & netlify functions |
dev:plain |
Run development, HMR server |
serve |
Run a production-like server |
build |
Create production-ready build |
lint |
Run ESLint |
test |
Run Jest and Enzyme |