Skip to content

A React-based portfolio and blog-search website built using Next.js.

Notifications You must be signed in to change notification settings

upenr/upendra-nextjs-website

Repository files navigation

Upendra Rajan's website

Running Locally

This application requires Node.js v18.17+.

git clone https://github.com/upenr/upendra-nextjs-website.git
cd upendra-nextjs-website
bun install
bun dev

Create a .env.local file similar to:

# For blog views and guestbook
POSTGRES_URL="postgres://..."
POSTGRES_PRISMA_URL="postgres://..."
POSTGRES_URL_NO_SSL="postgres://..."
POSTGRES_URL_NON_POOLING="postgres://..."
POSTGRES_USER="default"
POSTGRES_HOST="..."
POSTGRES_PASSWORD="..."
POSTGRES_DATABASE="verceldb"

## Generate a random secret: https://generate-secret.vercel.app/32 or `openssl rand -base64 32`
AUTH_SECRET=...

## Create a GitHub OAuth app here: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app
OAUTH_CLIENT_KEY=...
OAUTH_CLIENT_SECRET=...

## Support OAuth login on preview deployments, see: https://authjs.dev/guides/basics/deployment#securing-a-preview-deployment
AUTH_REDIRECT_PROXY_URL=https://.../api/auth

Database Schema

CREATE TABLE upenr-redirects (
  id SERIAL PRIMARY KEY,
  source VARCHAR(255) NOT NULL,
  destination VARCHAR(255) NOT NULL,
  permanent BOOLEAN NOT NULL
);

CREATE TABLE upenr-guestbook (
  id SERIAL PRIMARY KEY,
  email VARCHAR(255) NOT NULL,
  body TEXT NOT NULL,
  created_by VARCHAR(255) NOT NULL,
  created_at TIMESTAMP NOT NULL,
  updated_at TIMESTAMP
);

CREATE TABLE upenr-views (
  slug VARCHAR(255) PRIMARY KEY,
  count INT NOT NULL
);

Credits

Inspired by leerob.io

About

A React-based portfolio and blog-search website built using Next.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published