Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

Repository files navigation

Node - Amazon

Build Status

Built with Node, and Angular 22 with server-side rendering.

Browse products, filter by specs, add to cart, checkout, and manage orders.

Requirements

  • Node 24 or higher
  • PostgreSQL 14 or higher
  • Yarn 4 (via Corepack)

Getting Started

1. Install dependencies

yarn install

2. Configure the app

Edit config/amazon.json to set your database credentials and optional OAuth keys:

{
"postgresql": {
"user": "postgres",
"password": "postgres",
"host": "localhost",
"database": "node_amazon_dev",
},
"oauth": {
"google": {
"client": "YOUR_GOOGLE_CLIENT_ID",
"secret": "YOUR_GOOGLE_SECRET",
},
"facebook": { "client": "YOUR_FB_APP_ID", "secret": "YOUR_FB_SECRET" },
},
}

Note: OAuth is optional. Local email/password auth works without it.

3. Initialize the database

yarn init:db

This creates the node_amazon_dev database and runs Kysely migrations to set up all tables, views, triggers, and indexes, then seeds the database.

4. Start the dev server

yarn start

This builds the Angular app, starts the Express API on port 3000, and serves the Angular dev server on port 4200 with API requests proxied to Express.

Scripts

CommandDescription
yarn startBuild + run Express API and Angular dev server
yarn buildProduction build
yarn serveServe the production build (dist/server/server.mjs)
yarn init:dbCreate database and run Kysely migrations + seeds
yarn lintLint and auto-fix with ESLint
yarn e2eRun E2E tests using Playwright

E2E Testing

The project uses Playwright for E2E tests.

Running Tests

To run E2E tests against the development server:

yarn e2e

To target a different URL (such as the production backend):

PLAYWRIGHT_TEST_BASE_URL=http://localhost:3000 yarn e2e

About

E-commerce website done in Node, and Angular 22 (SSR)

Topics

Resources

Stars

50 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages