Local Development
Develop your application locally with ProStack
This guide explains how to effectively develop your application using ProStack’s development workflow.
Development Server
Start the development server with:
The development server will be available at http://localhost:3000 with hot reloading enabled.
Project Structure
ProStack follows a modular structure to keep your code organized:
Development Scripts
ProStack includes several npm scripts to help with development:
Script | Description |
---|---|
bun run dev | Start the development server |
bun run build | Build the application for production |
bun run start | Start the production server |
bun run lint | Run ESLint to check for code issues |
bun run db:push | Push schema changes to the database |
bun run db:studio | Open Prisma Studio to manage database |
Working with Components
ProStack includes a set of reusable UI components in the components/
directory. These components are built with accessibility and performance in mind.
Example: Using a Button Component
Working with Server Actions
ProStack uses React Server Actions for server-side operations. Here’s an example of a server action for joining a waitlist:
Error Handling
ProStack includes a standardized approach to error handling:
- Use try/catch blocks for server-side operations
- Return structured error responses from server actions
- Use toast notifications (via Sonner) for user-friendly error messages
Debugging
For debugging your Next.js application, you can:
- Use the built-in Chrome DevTools for client-side debugging
- Add console logs with
console.log()
for quick debugging - Set the
NODE_OPTIONS='--inspect'
environment variable for server-side debugging
Next Steps
Was this page helpful?