How somacap/soma-technical-assessment works
Project type and purpose
• This is a monolithic full-stack Next.js 13 application (using the App Router) that provides a todo/task management UI, a set of RESTful API routes under app/api/todos, and persists data in a SQLite database via Prisma ORM. It also integrates with the external Pexels API to fetch images.
File structure
• Top‐level folders:
• app/ contains both server components (API routes under app/api/todos) and client components/pages (app/page.tsx, app/layout.tsx).
• lib/prisma.ts is the data‐access layer initializing the Prisma client.
• prisma/ holds the SQLite DB (dev.db), schema (schema.prisma) and migrations.
• Config files: next.config.mjs, tailwind.config.ts, postcss.config.mjs, tsconfig.json.
• The API routes follow Next.js conventions:
• POST /api/todos and GET /api/todos in app/api/todos/route.ts
• GET, PATCH, DELETE for individual todos under app/api/todos/[id]/route.ts
Key insights from the README
• Built on Next.js (React + serverless functions).
• SQLite via Prisma for persistence.
• Task‐enhancement features to add: due dates, Pexels image preview, and task dependency graph.