This is the repository for Caneca V2, a full-stack rubbish classification app built with Next.js and Payload CMS.
The primary purpose of this project is to provide a robust, shared API and admin panel. This backend will serve multiple frontends:
-
The existing V1 web app (for data collection).
-
The future V2 web app (which will be built in this repository).
-
A planned mobile app.
-
V1 Frontend Demo: https://caneca-self.vercel.app/
-
V1 Frontend Repo: https://github.com/Jotadebeese/caneca
- Phase 1 (Done): Backend foundation is built and deployed. It uses PostgreSQL on Neon and file storage on Cloudflare R2.
- Phase 2 (In Progress): Integrating the API with the V1 frontend for data collection.
- Phase 3 (Future): Build the new V2 web application frontend within this repository. Train an improved ML model. The shared backend API will be used by both the V2 web app and a future mobile app.
- Framework: Next.js
- CMS: Payload CMS 3.0
- Database: PostgreSQL (hosted on Neon)
- File Storage: Cloudflare R2
- Node.js (v20.18.1 or higher)
- A local PostgreSQL database
-
Clone the repo:
git clone [https://github.com/Jotadebeese/caneca_v2.git](https://github.com/Jotadebeese/caneca_v2.git) cd caneca_v2 -
Install dependencies (choose one):
Using npm:
npm install
Using yarn:
yarn
-
Set up environment variables:
- Copy
.env.exampleto a new file named.env. - Fill in the required values, especially
LOCAL_DATABASE_URIandPAYLOAD_SECRET.
cp .env.example .env
- Copy
-
Run the dev server (choose one):
Using npm:
npm run dev
Using yarn:
yarn dev
The admin panel will be available at http://localhost:3000/admin.
Contributions are welcome. Open an issue or submit a pull request.