Skip to content

nabinkhair42/fastly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

139 Commits
 
 
 
 
 
 

Repository files navigation

Fastly

A production-ready SaaS starter kit built with Next.js, TypeScript, and modern tooling.

Website · Documentation · Live Demo · Changelog

Next.js React TypeScript MongoDB Tailwind CSS shadcn/ui


Overview

Fastly is a comprehensive SaaS foundation that ships authentication, user management, file uploads, email workflows, and a polished marketing surface out of the box. It's designed for engineering teams who need to launch quickly without compromising on quality or security.

The project is structured as a monorepo with two independent Next.js applications:

App Description Port URL
main-app SaaS starter kit with auth, dashboard, and API 3000 create-fastly-app.nabinkhair.com.np
marketing Marketing site, documentation, and changelog 4000 fastly.nabinkhair.com.np

Features

Authentication & Security

  • Email/password authentication with verification codes
  • GitHub and Google OAuth providers
  • JWT access + refresh token rotation
  • Cross-device session management with revocation
  • Password reset and forgot password flows
  • Mutex-based token refresh to prevent race conditions

User Management

  • User profiles with avatar upload and cropping
  • Username claiming (one-time change)
  • Location, social accounts, and bio fields
  • Theme and font preferences
  • Account deletion with confirmation

Developer Experience

  • Full TypeScript coverage with strict mode
  • Biome for linting and formatting
  • Husky + lint-staged for pre-commit hooks
  • Turbopack for fast development builds
  • TanStack Query for data fetching and caching
  • Zod schemas for runtime validation
  • React Hook Form for type-safe forms

Marketing & Documentation

  • Prebuilt landing page with hero, features, tech stack, and FAQ sections
  • Fumadocs-powered documentation site with search and syntax highlighting
  • JSON-driven changelog with tracing beam timeline
  • SEO-optimized with OpenGraph and Twitter Card metadata
  • LLM-friendly text endpoints (/llms.txt)

Infrastructure

  • MongoDB with Mongoose for data persistence
  • UploadThing for file handling
  • Nodemailer + React Email for transactional emails
  • Vercel-optimized with after() for non-blocking post-response work
  • Parallelized API routes with Promise.all for reduced latency

Tech Stack

Category Technologies
Framework Next.js 16, React 19, TypeScript 5.9
Styling Tailwind CSS 4, tw-animate-css
UI shadcn/ui, Radix UI, cmdk, Lucide Icons
Forms React Hook Form, Zod, @hookform/resolvers
Database MongoDB, Mongoose
Auth JWT (jsonwebtoken), bcrypt, GitHub OAuth, Google OAuth
Email Nodemailer, React Email
Uploads UploadThing
Data Fetching TanStack React Query, Axios
Animation Motion (Framer Motion), Lenis
Docs Fumadocs, Shiki, Mermaid
Tooling Biome, Husky, lint-staged, Turbopack

Documentation

Comprehensive documentation is available at fastly.nabinkhair.com.np/docs covering:

Deployment

Both apps are deployed on Vercel as separate projects.

Main App

  1. Import main-app directory as a new Vercel project
  2. Set root directory to main-app
  3. Add all environment variables from .env.local
  4. Deploy

Marketing Site

  1. Import marketing directory as a new Vercel project
  2. Set root directory to marketing
  3. Deploy

Scripts

Main App

Script Description
pnpm dev Start development server with Turbopack
pnpm build Build for production
pnpm lint Run Biome linter
pnpm format Format code with Biome
pnpm type-check Run TypeScript type checking
pnpm clean Remove .next build directory

Marketing

Script Description
pnpm dev Start development server with Turbopack
pnpm build Build for production
pnpm lint Run Biome linter
pnpm format Format code with Biome

Contributing

Issues and pull requests are welcome. Please ensure linting and formatting checks pass before submitting changes:

pnpm lint
pnpm format:check
pnpm type-check

Links


License

This project is open source. See the repository for license details.

About

A comprehensive starter kit providing a foundational layer for SaaS applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors