Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
NotificationsYou must be signed in to change notification settings

timothyguo86/eStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A full-stack e-commerce application built with Angular and Node.js/Express, featuring a modern user interface and robustbackend functionality.

Project Structure

This repository contains two main projects:

  • eStore-angular/ - Frontend application built with Angular
  • eStore-server/ - Backend API server built with Node.js and Express

Technologies Used

Frontend (eStore-angular)

  • Angular 19.1.0
  • TypeScript 5.7.2
  • Bootstrap 5.3.3
  • Font Awesome Icons
  • RxJS 7.8.0
  • Angular Router
  • Angular Forms

Backend (eStore-server)

  • Node.js
  • Express 4.21.2
  • MySQL 3.12.0
  • JWT Authentication (jsonwebtoken 9.0.2)
  • bcryptjs 3.0.2
  • CORS support

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (Latest LTS version recommended)
  • npm (comes with Node.js)
  • MySQL Server
  • Angular CLI (npm install -g @angular/cli)

Installation

Frontend Setup

# Navigate to frontend directorycd eStore-angular# Install dependenciesnpm install# Start development servernpm run start

Backend Setup

# Navigate to backend directorycd eStore-server# Install dependenciesnpm install# Create .env file and configure environment variablescp .env.example .env# Start development servernodemon index.js

Environment Configuration

Frontend Environment Variables

Create environment files ineStore-angular/src/environments/:

// environment.tsexportconstenvironment={production:false,apiUrl:'http://localhost:3000'};

Backend Environment Variables

Create a.env file ineStore-server/:

PORT=3000DB_HOST=localhostDB_USER=your_usernameDB_PASSWORD=your_passwordDB_NAME=estore_dbJWT_SECRET=your_jwt_secret

Database Setup

  1. Create a MySQL database named 'estore_db'
  2. The application will automatically create required tables on first run
  3. Initial data can be imported using provided SQL scripts (if any)

Features

Frontend Application

  • Responsive user interface using Bootstrap
  • User authentication and authorization
  • Product catalog with search and filter capabilities
  • Shopping cart functionality
  • User profile management
  • Order history and tracking

Backend API

  • RESTful API endpoints
  • JWT-based authentication
  • MySQL database integration
  • Password encryption
  • CORS enabled
  • Input validation and sanitization

API Documentation

Authentication Endpoints

  • POST/api/auth/register - User registration
  • POST/api/auth/login - User login
  • GET/api/auth/profile - Get user profile

Product Endpoints

  • GET/api/products - Get all products
  • GET/api/products/:id - Get product by ID
  • POST/api/products - Create new product (Admin only)
  • PUT/api/products/:id - Update product (Admin only)
  • DELETE/api/products/:id - Delete product (Admin only)

Order Endpoints

  • GET/api/orders - Get user orders
  • POST/api/orders - Create new order
  • GET/api/orders/:id - Get order details

Deployment

Frontend Deployment

  1. Build the production version:
cd eStore-angularng build --configuration production

Backend Deployment

  1. Ensure all environment variables are properly set
  2. Build and start the server:
cd eStore-servernodemon index.js

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp