🎨 Fullstack Painting Store - Setup & User Guide

This is a complete e-commerce application for a painting store, built with Angular (frontend), Node.js/Express (backend), and PostgreSQL (database).

🚀 Quick Start Installation

Prerequisites Ensure you have the following installed on your machine:

Node.js & npm

Docker & Docker Compose

Git

Clone the Repository

Open powershell

git clone https://github.com/amiraalaa942-bit/Dag-Decoration.git

cd Dag-Decoration

Now you are in the correct folder to run project commands

Backend Setup & Launch

Open powershell

1. Install backend dependencies

npm install

2. Start Docker and the PostgreSQL container

open docker desktop run commands :

1- docker run --name painting-postgres \ -e POSTGRES_USER=your-user \ -e POSTGRES_PASSWORD=your-pass \ -e POSTGRES_DB=your-db \ -p 5432:5432 \ -v postgres_data:/var/lib/postgresql/data \ -d postgres:15

2- docker ps

3- docker start painting-postgres

3. Run database migrations to set up tables

npm run migrate

4. Start the backend server

cd src npm start Backend server runs on http://localhost:3000

Frontend Setup & Launch

open new powershell

1. Navigate to the Angular frontend directory

cd My-Store

2. Install frontend dependencies

npm install

3. Start the Angular development server

ng serve Frontend server runs on http://localhost:4200

📁 Project Structure

Key directories and files in the repository:

My-Store/ - Angular frontend application

src/ - Node.js backend source code

migrations/ - Database migration scripts

uploads/ - Folder for uploaded painting assets (not tracked in Git)

.env.example - Template for environment variables (copy to .env and fill in your details)

🔧 Environment Configuration

Crucial Security Step: Before running the backend, you must create your environment file:

bash cp .env.example .env Then, open the new .env file and fill in your own values for:

Database credentials (POSTGRES_*)

JWT Secret Key (JWT_SecretKey)

Admin login (ADMIN_USER, ADMIN_PASS)

Email service configuration (for order notifications)

👥 Application Workflow & User Roles

Step 1: Login

image

Admin: Use the pre-configured admin credentials from the .env file
Client: Register by clicking Create New Account button in login page

image

Enter your credentials and then log in with it

Step 2.1: Admin Role Actions

image

The paintings page will open

image

You can add paintings by clicking the Add Painting button, entering details, and saving
You can click on continue shopping to see the uploaded painting

image

Uploaded painting images are stored in the uploads/ folder
You can delete a painting by clicking the delete button below it

Step 2.2: Client Role Actions

image

Shopping : Add paintings to your cart from the main gallery.

image

Manage Cart: Go to your cart to review items

# You can:

image

Increase (+) or decrease (-) quantities

image

Remove items entirely

The total amount updates dynamically

Step 3: Checkout

image

Enter your name, phone, and location in the form then click on Continue button

Step 4: Confirm Order

image

Review your purchasing Info then click on Confirm button

Step 5: Final Confirmation

image

✅ Your order has been successfully submitted. A notification has been sent to the administrative team for processing

Step 6: Continue Shopping

Click Continue Shopping to return to the paintings page.

Note: Your shopping cart state is saved per session. If you log out and log back in later, your cart items will be preserved.

Enjoy your painting shopping experience! 🎨

Built With

Share this project:

Updates