mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-12-12 03:06:40 +00:00
2.7 KiB
2.7 KiB
Copilot Instructions for sucker.severian.dev
Project Overview
- This is a Next.js project with a custom proxy API and UI components, using Tailwind CSS and PostCSS for styling.
- The main app logic is in
src/app/, with global styles inglobals.cssand layout inlayout.tsx. - API routes are under
src/app/api/proxy/, including image proxying (image/route.ts). - UI components are in
src/components/ui/and utility functions insrc/components/lib/.
Architecture & Data Flow
- The app uses Next.js routing and API routes for backend logic. The proxy API handles requests to external services, including image fetching and transformation.
- UI components follow a modular pattern, with reusable elements (e.g.,
button.tsx,card.tsx). - Data flows from API routes to UI via React props and hooks. No global state management library is present.
Developer Workflows
- Build & Dev: Use
npm run devto start the development server. Checkpackage.jsonfor other scripts. - Styling: Tailwind CSS is configured via
tailwind.config.jsand PostCSS viapostcss.config.js. - API: Custom logic for proxying and image handling is in
src/app/api/proxy/. Review these files for request/response patterns. - No test suite detected. If adding tests, follow Next.js and React conventions.
Project-Specific Conventions
- API routes use Next.js
route.tsfiles, with custom logic for proxying and image manipulation. - UI components are colocated in
src/components/ui/and use Tailwind utility classes. - Utility functions (e.g., PNG handling) are in
src/components/lib/. - Minimal documentation; refer to code for implementation details.
- Changelog is maintained in
README.md.
Integration Points & External Dependencies
- Relies on Next.js, React, Tailwind CSS, and PostCSS.
- External requests are proxied via custom API routes.
- Docker support via
docker-compose.ymlanddockerfilefor containerization.
Examples
- To add a new API route: create a
route.tsundersrc/app/api/yourroute/. - To add a new UI component: place a
.tsxfile insrc/components/ui/and use Tailwind for styling. - For image processing, review
src/app/api/proxy/image/route.tsandsrc/components/lib/png.ts.
Key Files & Directories
src/app/— Main app logic and API routessrc/components/ui/— UI componentssrc/components/lib/— Utility functionstailwind.config.js,postcss.config.js— Styling configurationdocker-compose.yml,dockerfile— ContainerizationREADME.md— Changelog and minimal project notes
If any section is unclear or missing important project-specific details, please provide feedback to improve these instructions.