felixgro / felixgrohs.dev-v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

felixgrohs.dev v2

Netlify Status

Rebuilding my old personal website using preact and typescript.

Improvements 🚀

  • 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

Project Structure

Directory Description
packages/ core application packages
    client/ preact frontend
    server/ serverless functions
    common/ shared logic and types
    scripts/ workflow scripts & githooks

Development

Requirements

Getting Started

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

With 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

All CLI Commands

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

About


Languages

Language:TypeScript 89.7%Language:JavaScript 4.7%Language:CSS 4.6%Language:HTML 0.8%Language:Shell 0.2%