MCPcopy Index your code
hub / github.com/alan345/AI-Fullstack-SaaS-Boilerplate

github.com/alan345/AI-Fullstack-SaaS-Boilerplate @v2.0.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.7 ↗ · + Follow
90 symbols 239 edges 77 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

image

Fullstack SaaS Boilerplate

Built with Fastify, tRPC, and React.

Project

GitHub stars GitHub forks GitHub license GitHub issues GitHub issues

Demo

Demo Fullstack-SaaS-Boilerplate

Hosted by render.com for free

Preview

demo

Main Stack

Technology Description Stars
Drizzle A TypeScript-first ORM for Node.js GitHub Repo stars
Fastify Fast, unopinionated, minimalist web framework for Node.js GitHub Repo stars
Postgres The world's most advanced open source database GitHub Repo stars
React 19 A JavaScript library for building user interfaces GitHub Repo stars
Tailwind v4 A utility-first CSS framework for rapid UI development GitHub Repo stars
tRPC End-to-end typesafe APIs made easy GitHub Repo stars

Other dependencies

Technology Description Stars
Better Auth Authentication library for Node.js GitHub Repo stars
Lucide Icons Beautifully simple & consistent icons GitHub Repo stars
npm Workspace Workspaces for managing multiple packages in a single repository GitHub Repo stars
Playwright Test your web apps headlessly with a single API GitHub Repo stars
React Router v7 Declarative routing for React GitHub Repo stars
TypeScript TypeScript is a typed superset of JavaScript GitHub Repo stars
Vite Next generation frontend tooling. It's fast! GitHub Repo stars
Zod TypeScript-first schema validation with static type inference GitHub Repo stars
Zustand Bear necessities for state management in React GitHub Repo stars

Features

  • Beers from random-data-api.com Example of pulling data from externals REST API
  • Health Check for the server (http://localhost:2022/health.trpc) and (http://localhost:2022)
  • Search with Debounce Using a Custom Hook
  • Chat with Server-Sent Events (SSE). SSE is easier to setup and don't require setting up a WebSocket server.

Installation

  • Update the server server.env file and the client client.env file with your credentials
  • Make sure Postgres is running and create a new database called fsb
psql -U user // replace user by your postgres user
CREATE DATABASE fsb;
  • Run in the terminal In the root directory:
// Install the dependencies
npm i

// Setup the database
npm run push

// Seed the database
npm run seed

// Run the app (it will run the client and the server automatically)
npm run dev

Building for production

  • Update the .gitignore file by uncommenting # .env to ensure your credentials remain private and are not exposed.
npm run build
npm run start

Printscreens

Screenshot 2025-01-29 at 9 23 13 AM

image

Screenshot 2025-01-29 at 9 23 22 AM Screenshot 2025-01-29 at 9 23 27 AM Screenshot 2025-01-29 at 9 23 32 AM Screenshot 2025-01-29 at 9 23 37 AM Screenshot 2025-01-29 at 9 23 40 AM Screenshot 2025-01-29 at 9 23 46 AM

Motivation

Focusing on developer experience: simple, efficient, and fast. This modern stack uses top-tier libraries to build a full-stack web application. Unlike the T3 app (https://create.t3.gg), we opted not to use Next.js, allowing the frontend to remain as static files, easily stored in cloud object storage like AWS S3. Consequently, this stack is designed for building web apps rather than traditional websites, as it is not SEO-friendly.

End-to-end typesafe with Trpc

trpc-video-ter Video from https://trpc.io

E2E Testing

The tests should be executed while the application is running.

Running the tests in the Terminal

npm run test

Other recommendations

  • Need a component library? Check out Chakra UI
  • If your stack is getting more and more shared workspaces, consider using pnpm instead of npm

Who is using TER?

  • Nachonacho.com - The world's largest marketplace for Software & Services

Create a PR if you want to add your project here.

How you can help?

This project is free and open source. If you found it useful, consider giving it a star ⭐ or sponsoring me 💖 — it really helps! I'm always open to feedback, so feel free to share suggestions to improve the stack. You’re also welcome to contribute by opening a pull request 🚀.

GitHub issues

image

Extension points exported contracts — how you extend this code

ImportMetaEnv (Interface)
(no doc)
client/src/vite-env.d.ts
ChatMessage (Interface)
(no doc)
server/src/lib/sse.ts
ImportMeta (Interface)
(no doc)
client/src/vite-env.d.ts
ChatEvent (Interface)
(no doc)
server/src/lib/sse.ts
ChatEvent (Interface)
(no doc)
client/src/components/message/SSEConnection.tsx
Beer (Interface)
(no doc)
server/src/type/Beer.type.ts
SSEConnectionProps (Interface)
(no doc)
client/src/components/message/SSEConnection.tsx
Props (Interface)
(no doc)
client/src/components/message/InfiniteScroll.tsx

Core symbols most depended-on inside this repo

makeQueryClient
called by 2
client/src/App.tsx
getLinkPage
called by 2
client/src/layout/Pagination.tsx
sendEvent
called by 2
server/src/lib/sse.ts
getQueryClient
called by 1
client/src/App.tsx
updateUser
called by 1
client/src/components/user/UpdateUserEmail.tsx
updateUser
called by 1
client/src/components/user/UpdateUserAge.tsx
updateUser
called by 1
client/src/components/user/UpdateUserName.tsx
useDebounced
called by 1
client/src/components/search/useDebounced.tsx

Shape

Function 77
Interface 13

Languages

TypeScript100%

Modules by API surface

client/src/components/message/MessageInput.tsx5 symbols
server/src/lib/sse.ts4 symbols
server/src/handlers/sse.ts4 symbols
client/src/components/message/MessageGroup.tsx4 symbols
client/src/components/message/InfiniteScroll.tsx4 symbols
client/src/App.tsx4 symbols
packages/drizzle/src/seed/seed.ts3 symbols
client/src/components/message/SSEConnection.tsx3 symbols
client/src/components/message/Chat.tsx3 symbols
client/src/vite-env.d.ts2 symbols
client/src/layout/Pagination.tsx2 symbols
client/src/layout/LayoutApp.tsx2 symbols

Datastores touched

fsbDatabase · 1 repos

For agents

$ claude mcp add AI-Fullstack-SaaS-Boilerplate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page