SpreadTheSheets is a real-time collaborative spreadsheet application built with Next.js, Firebase, and Tailwind CSS. It focuses on fast editing, clean UI, and practical collaboration tools like sharing, presence, chat, version history, and AI-assisted workflows.
- Real-time collaborative grid editing with Firestore-backed sync
- Formula support and computed cell display
- Search and replace tools for fast sheet updates
- Formatting controls (bold, italic, text color, background color)
- Cell comments and dropdown options
- Presence indicators for active collaborators
- Built-in team chat sidebar
- Version history with restore actions
- Share modal with private/view/edit modes and collaborator access
- AI assistant panel for formula help, analysis, rewriting, and table templates
- CSV export and chart support
- Responsive dashboard, editor, and auth flows
- Light and dark theme support
- Next.js 14 (App Router)
- React 18
- TypeScript
- Tailwind CSS
- Firebase Authentication + Cloud Firestore
- GitHub Models API for AI features
app/: routes, layouts, global styles, and API endpointsapp/api/ai/route.ts: server route that proxies AI requests to GitHub Modelscomponents/: UI building blocks (editor, dashboard, modals, toolbar, grid)hooks/: custom React hooks for auth, presence, theme, and spreadsheet statelib/: Firebase setup, Firestore data access, and spreadsheet utilitiestypes/: shared TypeScript typesfirestore.rules: Firestore security rules
npm installCreate a .env.local file in the project root and add:
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
GITHUB_TOKEN=...
GITHUB_MODEL=openai/gpt-4.1Notes:
GITHUB_TOKENis required for AI features.GITHUB_MODELis optional and defaults toopenai/gpt-4.1.
npm run devOpen http://localhost:3000.
npm run dev: clean.nextand start Next.js dev servernpm run dev:clean: same asdevnpm run build: clean.nextand create production buildnpm run start: run production servernpm run lint: run Next.js lint checksnpm run clean: remove.nextbuild cache
This app is configured for Vercel deployment as a Next.js project.
vercel.jsonuses:
{
"framework": "nextjs"
}- Ensure all Firebase and GitHub environment variables are set in Vercel Project Settings.
- Authentication: Google sign-in and guest access
- Database: Cloud Firestore
- Security: controlled by
firestore.rules
- AI panel returns server error:
Ensure
GITHUB_TOKENis set in your environment. - Firebase init/auth issues:
Verify all
NEXT_PUBLIC_FIREBASE_*keys are present and correct. - Deployment returns 404 on Vercel:
Confirm the project root is correct and
vercel.jsonuses the Next.js framework config.
Private project. Add a license section if you plan to open source it.