sandbox-notebookllamalm-nextjs/frontend/next.config.js
michael 3df343adef Implement JWT authentication, email autocomplete for sharing, and fix local dev routing
Security improvements:
- Add JWT token authentication for all API endpoints
- Create jwt_auth middleware with token generation and validation
- Update auth routes to return access tokens on login/signup
- Add Authorization header interceptor in frontend API client
- Store JWT tokens in Zustand auth store
- Remove insecure user_id query parameters

Sharing enhancements:
- Add user search API endpoint (GET /api/auth/users/search)
- Implement autocomplete in share modal with debounced search
- Show email and username suggestions in dropdown
- Add keyboard navigation (arrows, Enter, Escape)
- Filter out already-shared users and current user from results
- Add email format validation on frontend and backend

Developer experience:
- Make basePath environment-specific (empty in dev, /notebookllama in prod)
- Update next.config.js to support local development without basePath
- Fix routing issues in local development (login/signup redirects)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 12:51:39 -06:00

17 lines
519 B
JavaScript

/** @type {import('next').NextConfig} */
// Use basePath only in production (for deployment under /notebookllama subdirectory)
// In development, run without basePath at http://localhost:4000
const isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
basePath: isProd ? '/notebookllama' : '',
assetPrefix: isProd ? '/notebookllama' : '',
// Ensure trailing slashes are handled correctly
trailingSlash: false,
// Output configuration
output: 'standalone',
};
module.exports = nextConfig;