Skip to content

GabenGar/next-js-site

Repository files navigation

Gabengars

Table of Contents

  1. Requirements
  2. Installation
  3. Develop
  4. Build
  5. CLI
  6. Database
  7. TODOs

Requirements

  • NodeJS - 12.20+
  • PostgreSQL - 10+

Installation

Clone repo:

git clone https://github.com/GabenGar/next-js-site.git
cd next-js-site
npm install

Create .env files and set the values in .env.local:

npm run env

SECRET_KEY can be generated by:

openssl rand -base64 32

Develop

Run the dev setup:

npm run dev

Build

npm run build

The result will be inside .next folder.

CLI

CLI can be run with this base command:

npm run cli -- --help

Everything after -- is passed to the CLI as arguments, so the command above will show the help command.

Database

Dont's: https://wiki.postgresql.org/wiki/Don't_Do_This

Create migration file:

npx node-pg-migrate create {migration_name} --migrations-dir src/database/migrations --migration-filename-format utc --migration-file-language sql

MISC

Bind the specific ssh key to the git repo, courtesy of github comment:

git config core.sshCommand "ssh -i ~/.ssh/id_rsa_file -F /dev/null"

TODOs

  • one-button validation interface
  • styled validation errors
  • scripts relying on config.json.schema to work with ref schemas
  • locale-specific date formatting
  • pre-deploy validation
  • CLI tool
  • JSON Schema validated forms
  • extendable layout
  • comment threads
  • multilang error pages
  • abstract away per-page locale management
  • exclude database.schema.json from the main codegen
  • resolve the BigInt question
  • development mock generation
  • translation status per-file rundown
  • ISR for /profiles and /profile pages
  • node 16 migration
  • storage management for admins
  • proper logging