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.ts
andprisma.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.