Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A web interface for launching and managing Cursor Cloud Agents.

Why don't penguins like talking to strangers at parties? Because they break the ice!

## Setup
## Development Setup

1. Install dependencies:
```bash
Expand All @@ -30,3 +30,60 @@ Why don't penguins like talking to strangers at parties? Because they break the
## Getting an API Key

Get your API key from [cursor.com/dashboard](https://cursor.com/dashboard). Your key is stored locally in your browser and never sent to any server other than Cursor's API.

## Production Deployment

### Build

Build the production bundle:
```bash
npm run build
```

### Environment Variables

No environment variables are required for basic operation. The application runs entirely client-side with API keys stored in the browser's localStorage.

Optional environment variables:
- `NODE_ENV`: Set to `production` for production builds (automatically set by most deployment platforms)

### Deployment

This is a Next.js application that can be deployed to:

- **Vercel** (recommended): Connect your GitHub repository and deploy automatically
- **Netlify**: Use the Next.js build preset
- **Docker**: Build with `docker build -t cursor-web .` (requires Dockerfile)
- **Any Node.js hosting**: Run `npm run build && npm start`

### Health Check

The application includes a health check endpoint at `/api/health` for monitoring and load balancer health checks.

### Security Features

- ✅ Security headers (HSTS, X-Frame-Options, CSP, etc.)
- ✅ API route validation and rate limiting
- ✅ Input sanitization and path traversal protection
- ✅ Error boundaries for graceful error handling
- ✅ Request size limits and timeout protection

### Monitoring

- Vercel Analytics is integrated for usage tracking
- Error logging is configured (can be extended with Sentry or similar)
- Health check endpoint available at `/api/health`

### Performance

- Optimized Next.js build with production optimizations
- Image optimization enabled
- Static asset caching configured
- Code splitting and lazy loading

## Scripts

- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run start` - Start production server
- `npm run lint` - Run ESLint
39 changes: 39 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,45 @@ const nextConfig: NextConfig = {
},
},
},

// Security headers
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
],
},
];
},
};

export default nextConfig;
13 changes: 0 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading