{"id":24905672,"url":"https://github.com/kevveth/ecommerce_fullstack","last_synced_at":"2026-04-07T18:32:34.154Z","repository":{"id":273002082,"uuid":"918425518","full_name":"kevveth/ecommerce_fullstack","owner":"kevveth","description":"A full-stack e-commerce platform built with React for the front-end, TypeScript and Zod for type safety, and Node/Express/PostgreSQL for the backend. Features client-side routing with React Router, async state management with React Query, and secure authentication using bcrypt, Passport, and CORS.","archived":false,"fork":false,"pushed_at":"2025-07-01T03:18:16.000Z","size":11276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T04:26:47.299Z","etag":null,"topics":["bcrypt","cors","ecommerce","express","full-stack","node","passport","postgresql","react","react-query","react-router","typescript","validation","zod"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevveth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-17T22:55:15.000Z","updated_at":"2025-06-21T05:05:52.000Z","dependencies_parsed_at":"2025-02-01T09:20:33.318Z","dependency_job_id":"f07056dd-447c-49bc-813d-c9ec2076848d","html_url":"https://github.com/kevveth/ecommerce_fullstack","commit_stats":null,"previous_names":["kevveth/ecommerce_fullstack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kevveth/ecommerce_fullstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevveth%2Fecommerce_fullstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevveth%2Fecommerce_fullstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevveth%2Fecommerce_fullstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevveth%2Fecommerce_fullstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevveth","download_url":"https://codeload.github.com/kevveth/ecommerce_fullstack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevveth%2Fecommerce_fullstack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31524525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcrypt","cors","ecommerce","express","full-stack","node","passport","postgresql","react","react-query","react-router","typescript","validation","zod"],"created_at":"2025-02-02T00:24:07.654Z","updated_at":"2026-04-07T18:32:34.132Z","avatar_url":"https://github.com/kevveth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce Full-Stack Project\n\nThis repository contains a full-stack e-commerce application built as a learning exercise. The project uses a fictional coffee shop as the business model, but the primary focus is on implementing and understanding key web development concepts and technologies.\n\nThe application is structured as a monorepo using Turbo and pnpm, with a React/TypeScript frontend, Node.js/Express backend, and PostgreSQL database. Through building this project, I've implemented and gained experience with:\n\n- Type safety across frontend and backend using TypeScript and Zod\n- RESTful API design with structured error handling\n- State management with React Context and React Query\n\nThis is my first substantial full-stack application, developed to strengthen my skills in modern web development practices.\n\n![Project Status](https://img.shields.io/badge/status-in%20development-yellow)\n\n## Technologies Used\n\n- **Frontend:**\n  - React: A JavaScript library for building user interfaces.\n  - TypeScript: A superset of JavaScript that adds static typing for improved code quality.\n  - CSS Modules: For styling components with scoped CSS.\n  - React Router: For client-side routing.\n  - React Query: For asynchronous state management and data fetching.\n- **Backend:**\n  - Node.js: A JavaScript runtime environment.\n  - Express: A web application framework for Node.js.\n  - PostgreSQL: A powerful and open-source relational database.\n- **DevOps \u0026 Tools:**\n  - Turbo: For monorepo management.\n  - pnpm: As the package manager.\n  - Vitest: For testing.\n- **Validation \u0026 Type Safety:**\n  - Zod v4: For schema validation with enhanced error formatting using z.prettifyError.\n  - Shared schemas: Common validation schemas used across frontend and backend.\n  - TypeScript: For static type checking and code completion.\n  - Custom error handling: Structured error responses for validation failures.\n\n## Project Structure\n\nThis project is organized as a monorepo with the following structure:\n\n```\necommerce_fullstack/\n├── apps/\n│   ├── client/      # React frontend application\n│   └── server/      # Express backend API\n└── packages/\n    └── shared/      # Shared code, types and schemas\n```\n\n## Features\n\n- **Product Browsing:** Browse and search for coffee products with detailed information.\n- **User Profile Management:**\n  - View and edit user information\n  - Save multiple shipping addresses\n  - Username-based profile viewing\n\n## Installation \u0026 Setup\n\n### Prerequisites\n\n- Node.js (v16 or newer)\n- pnpm package manager\n- PostgreSQL database\n\n### Initial Setup\n\n1. Clone the repository:\n\n   ```bash\n   git clone [repository-url]\n   cd ecommerce_fullstack\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pnpm install\n   ```\n\n3. Set up environment variables:\n\n   - Create `.env` files in both `apps/client` and `apps/server` directories\n   - Required variables for server:\n     ```\n     PORT=3001\n     DATABASE_URL=postgresql://username:password@localhost:5432/ecommerce\n     CLIENT_URL=http://localhost:5173\n     ```\n   - Required variables for client:\n     ```\n     VITE_SERVER_URL=http://localhost:3001\n     ```\n\n4. Initialize the database:\n\n   - Create a PostgreSQL database named 'ecommerce'\n   - The application will automatically initialize the database schema when it starts\n   - Database schema is defined in `apps/server/src/database/ecommerce.sql`\n   - You can start the server with: `pnpm --filter server dev`\n\n## Usage\n\n### Development\n\nTo run the project in development mode:\n\n```bash\n# From project root\npnpm run dev  # Starts both client and server with Turbo\n\n# Or run individually\npnpm --filter client dev  # Runs Vite dev server on port 5173\npnpm --filter server dev-server  # Compiles TypeScript and runs the server with auto-reload\n```\n\n# Alternative development command for server\n\n# Just compiles TypeScript without running the server:\n\npnpm --filter server dev\n\n### Testing\n\nTo run tests:\n\n```bash\n# Run all tests\npnpm test\n\n# Run server tests with Vitest\npnpm --filter server test\n\n# Run tests with coverage reporting\npnpm --filter server test:coverage\n\n# Run tests in watch mode\npnpm --filter server test:watch\n\n# Run tests with UI\npnpm --filter server test:ui\n```\n\n## Database Structure\n\nThe application uses PostgreSQL with the following key tables:\n\n- **Users**: Stores user credentials and profile information\n- **Products \u0026 Categories**: Organizes the coffee product catalog with relationships\n- **Carts \u0026 CartItems**: Tracks user shopping carts with product quantities and pricing\n- **Orders \u0026 OrderItems**: Records completed purchases with customer information\n- **Reviews**: Stores product reviews with ratings and text\n\n## Known Limitations\n\n- Checkout functionality is currently in development\n- Limited internationalization support\n- Error handling for React components could be enhanced with more comprehensive error boundaries\n- Frontend state management could benefit from more organization as the application grows\n- Current focus is on authentication and user management; product catalog features need expansion\n\n## TODO\n\n- **Deployment Instructions**: Documentation for deploying to production environments\n- **License Information**: Add appropriate license for the project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevveth%2Fecommerce_fullstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevveth%2Fecommerce_fullstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevveth%2Fecommerce_fullstack/lists"}