The Good Corner V2 is a full-stack classifieds application inspired by platforms like LeBonCoin. Users can browse, search, and manage ads with a responsive interface, secure authentication, and image upload support.
https://stg.the-good-corner.hyna.me
- Authentication with JWT tokens stored in cookies for session management.
- Ads CRUD: create, read, update, and delete ads with categories, tags, and pictures.
- Search & Filters: filter ads by title, category, or tag.
- Responsive UI built with React and CSS media queries.
- Image Upload microservice handling file validation and storage.
- CI/CD pipeline with automated tests and Docker image publishing.
- Testing with unit tests and end-to-end Playwright tests.
- Frontend: React 18, Vite, Apollo Client, React Router, React Hook Form, Yup
- Backend: Node.js, TypeScript, Apollo Server, TypeGraphQL, TypeORM, argon2, JWT
- Image Service: Express, Multer
- Database: PostgreSQL
- DevOps: Docker, Docker Compose, Nginx, GitHub Actions
- Testing: Jest, Vitest, Playwright
The project uses a containerized microservice architecture:
- Backend: GraphQL API built with Apollo Server and TypeGraphQL, communicating with PostgreSQL via TypeORM.
- Frontend: React single-page application served by Vite.
- Image Service: Express service for uploading and serving images.
- Nginx Gateway: Routes requests to frontend, backend, and image services.
- PostgreSQL: Stores users, ads, categories, tags, and pictures.
Services are orchestrated through Docker Compose with health checks.
-
Clone the repository
git clone git@github.com:hyna42/TGC-V2.git cd TGC-V2 -
Set up environment variables
cp .env.exemple .env # Edit .env and update the values as needed -
Run with Docker Compose
docker compose up --build
The app will be available through the Nginx gateway.
Install dependencies and start each service:
cd backend && npm install && npm start
cd frontend && npm install && npm start
cd img && npm install && npm start- Backend:
cd backend && npm test - Frontend:
cd frontend && npm test - Image Service:
cd img && npm test - End-to-end:
cd e2e && npx playwright test
This project is licensed under the MIT License.