Skip to content

FaZeRs/portfolio

Repository files navigation

Portfolio

Installation

git clone [email protected]:FaZeRs/portfolio.git

About

Folder structure:

.github
  └─ workflows
        └─ CI with pnpm cache setup
.vscode
  └─ Recommended extensions and settings for VSCode users
apps
  └─ web
      ├─ Next.js 14
      ├─ React 18
      ├─ Tailwind CSS
      └─ E2E Typesafe API Server & Client
packages
  ├─ api
  |   └─ tRPC v11 router definition
  ├─ auth
  |   └─ Authentication using next-auth.
  ├─ db
  |   └─ Typesafe db calls using Drizzle & Supabase
  ├─ transactional
  |   └─ Email, SMS, and other transactional services
  ├─ ui
  |   └─ Start of a UI package for the webapp using shadcn-ui
  └─ validators
      └─ Shared validators using zod
tooling
  ├─ eslint
  |   └─ shared, fine-grained, eslint presets
  ├─ prettier
  |   └─ shared prettier configuration
  ├─ tailwind
  |   └─ shared tailwind configuration
  └─ typescript
      └─ shared tsconfig you can extend from

In this template, we use @acme as a placeholder for package names. As a user, you might want to replace it with your own organization or project name. You can use find-and-replace to change all the instances of @acme to something like @my-company or @project-name.

Quick Start

Note The db package is preconfigured to use Supabase and is edge-bound with the Vercel Postgres driver. If you're using something else, make the necessary modifications to the schema as well as the client and the drizzle config. If you want to switch to non-edge database driver, remove export const runtime = "edge"; from all pages and api routes.

To get it running, follow the steps below:

1. Setup dependencies

# Install dependencies
pnpm i

# Configure environment variables
# There is an `.env.example` in the root directory you can use for reference
cp .env.example .env

# Push the Drizzle schema to the database
pnpm db:push

Deployment

Next.js

Deploy to Vercel

Let's deploy the Next.js application to Vercel. If you've never deployed a Turborepo app there, don't worry, the steps are quite straightforward. You can also read the official Turborepo guide on deploying to Vercel.

  1. Create a new project on Vercel, select the apps/web folder as the root directory. Vercel's zero-config system should handle all configurations for you.

  2. Add your DATABASE_URL environment variable.

  3. Done! Your app should successfully deploy.