Project Structure
CursorLens follows a typical Next.js project structure with some additional directories for backend functionality. Here's an overview of the main directories and their purposes
CursorLens/
āāā app/
ā āāā [...openai]/
ā ā āāā route.ts
ā āāā api/
ā ā āāā chat/
ā ā āāā configurations/
ā ā āāā logs/
ā ā āāā stats/
ā ā āāā test/
ā āāā configurations/
ā ā āāā page.tsx
ā āāā logs/
ā ā āāā [id]/
ā ā ā āāā page.tsx
ā ā āāā LogsList.tsx
ā ā āāā page.tsx
ā āāā stats/
ā ā āāā page.tsx
ā āāā actions.ts
āāā components/
ā āāā ui/
ā ā āāā # Various UI components
ā āāā NavBar.tsx
ā āāā theme-provider.tsx
ā āāā theme-toggle.tsx
āāā lib/
āāā db.ts
āāā prisma.ts
Key directories and files:
app/: Contains the main application code using Next.js 13+ App Router[...openai]/: Catch-all route for OpenAI-related functionalityapi/: API routes for various functionalitiesconfigurations/,logs/,stats/: Page components for different sectionsactions.ts: Server actions (new in Next.js 13)layout.tsx: Root layout componentpage.tsx: Home page component
components/: Reusable React componentsui/: UI components, likely using a component library
lib/: Utility functions and shared logicdb.tsandprisma.ts: Database and Prisma ORM setuputils.ts: General utility functions
This structure leverages Next.js 13+ features like App Router and server components, organizing the application into logical sections for API routes, pages, and shared components.