Appearance
Key Files
The most important files in a ShipFast project and what each one does.
Configuration
| File | Purpose |
|---|---|
/config.js | Central config: app name, domain, Stripe plans, auth callbacks, Crisp ID, email settings |
/.env.local | Environment variables (never committed to git) |
/next-sitemap.config.js | Sitemap generation — set siteUrl to your production domain |
/next.config.js | Next.js config — security headers, image domains |
/tailwind.config.js | Tailwind + daisyUI theme configuration |
/middleware.js | Rate limiting middleware (add when needed) |
Library Helpers (/libs/)
| File | Purpose |
|---|---|
/libs/seo.js | getSEOTags() and renderSchemaTags() for SEO metadata |
/libs/api.js | Axios instance with error display, 401 redirect, /api base URL |
/libs/next-auth.js | NextAuth configuration and auth options |
/libs/mongoose.js | MongoDB connection helper (connectMongo()) |
/libs/resend.js | sendEmail() function for transactional emails |
/libs/stripe.js | Stripe helper for checkout sessions |
Models (/models/)
| File | Purpose |
|---|---|
/models/User.js | User schema — includes hasAccess boolean for paid feature gating |
API Routes (/app/api/)
| Route | Purpose |
|---|---|
/app/api/auth/[...nextauth]/route.js | NextAuth authentication endpoints |
/app/api/webhook/stripe/route.js | Stripe webhook handler — sets hasAccess on payment events |
/app/api/lead/route.js | Email collection endpoint for waitlist / lead capture |
App-Level Files
| File | Purpose |
|---|---|
/app/layout.js | Root layout — SEO tags, fonts, global providers |
/app/error.js | Global JavaScript error handler |
/app/not-found.js | 404 page handler |
/app/dashboard/layout.js | Private route wrapper — redirects unauthenticated users |
/app/blog/_assets/content.js | Blog posts, authors, categories |
/app/tos/page.js | Terms of service page (includes GPT prompt) |
/app/privacy-policy/page.js | Privacy policy page (includes GPT prompt) |