Skip to content

Key Files

The most important files in a ShipFast project and what each one does.

Configuration

FilePurpose
/config.jsCentral config: app name, domain, Stripe plans, auth callbacks, Crisp ID, email settings
/.env.localEnvironment variables (never committed to git)
/next-sitemap.config.jsSitemap generation — set siteUrl to your production domain
/next.config.jsNext.js config — security headers, image domains
/tailwind.config.jsTailwind + daisyUI theme configuration
/middleware.jsRate limiting middleware (add when needed)

Library Helpers (/libs/)

FilePurpose
/libs/seo.jsgetSEOTags() and renderSchemaTags() for SEO metadata
/libs/api.jsAxios instance with error display, 401 redirect, /api base URL
/libs/next-auth.jsNextAuth configuration and auth options
/libs/mongoose.jsMongoDB connection helper (connectMongo())
/libs/resend.jssendEmail() function for transactional emails
/libs/stripe.jsStripe helper for checkout sessions

Models (/models/)

FilePurpose
/models/User.jsUser schema — includes hasAccess boolean for paid feature gating

API Routes (/app/api/)

RoutePurpose
/app/api/auth/[...nextauth]/route.jsNextAuth authentication endpoints
/app/api/webhook/stripe/route.jsStripe webhook handler — sets hasAccess on payment events
/app/api/lead/route.jsEmail collection endpoint for waitlist / lead capture

App-Level Files

FilePurpose
/app/layout.jsRoot layout — SEO tags, fonts, global providers
/app/error.jsGlobal JavaScript error handler
/app/not-found.js404 page handler
/app/dashboard/layout.jsPrivate route wrapper — redirects unauthenticated users
/app/blog/_assets/content.jsBlog posts, authors, categories
/app/tos/page.jsTerms of service page (includes GPT prompt)
/app/privacy-policy/page.jsPrivacy policy page (includes GPT prompt)

See Also