Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pararell/eshop_mean
🛒 Ecommerce MEAN Stack ( MongoDB, Express and Node in Nest.js, Angular 18 SSR zoneless ) - render.com : https://eshop-mean.onrender.com/
https://github.com/pararell/eshop_mean
angular cart cloudinary dashboard docker ecommerce eshop express fullstack google-login heroku jwt mean-stack mongodb mongoose nestjs nodejs schema-org stripe typescript
Last synced: about 2 hours ago
JSON representation
🛒 Ecommerce MEAN Stack ( MongoDB, Express and Node in Nest.js, Angular 18 SSR zoneless ) - render.com : https://eshop-mean.onrender.com/
- Host: GitHub
- URL: https://github.com/pararell/eshop_mean
- Owner: pararell
- License: mit
- Created: 2020-04-22T15:24:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T19:19:07.000Z (6 months ago)
- Last Synced: 2024-06-04T11:58:02.774Z (6 months ago)
- Topics: angular, cart, cloudinary, dashboard, docker, ecommerce, eshop, express, fullstack, google-login, heroku, jwt, mean-stack, mongodb, mongoose, nestjs, nodejs, schema-org, stripe, typescript
- Language: TypeScript
- Homepage: https://eshop.privatelibrary.eu/
- Size: 5.34 MB
- Stars: 92
- Watchers: 6
- Forks: 41
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![MEAN](https://res.cloudinary.com/dnpgh1vhi/image/upload/v1615640124/logo1_gvrmpd.svg)
# Eshop template
![Lines of code](https://img.shields.io/tokei/lines/github/pararell/eshop_mean)
![GitHub repo size](https://img.shields.io/github/repo-size/pararell/eshop_mean)
![GitHub package.json version](https://img.shields.io/github/package-json/v/pararell/eshop_mean)
![GitHub Repo stars](https://img.shields.io/github/stars/pararell/eshop_mean?style=social)## Server : Nest.js with Express and MongoDB (Mongoose)
## Client : Angular (Server-side rendering)## Description
- Eshop with products and administration
- Typescript stack with decorators, use MongoDB and mongoose schemas, JWT Passport
- Theming with css variables![eshop-mean](https://res.cloudinary.com/dnpgh1vhi/image/upload/v1629725636/eshop-mean.png)
## Blog
- more info in blog [https://miroslavsmrtic.sk/blogs](https://miroslavsmrtic.sk/blogs)## Installation
One package.json contain now all neccessary for Nest and Angular, so server-side rendering with Angular is possible
```bash
$ npm install
```## Running the app
```bash
# development - start BE - port 4000
$ npm run start:dev# development - start FE - port 3000
$ npm run start:client# watch mode server
$ npm run start:dev# build ssr and serve
$ npm run build
$ npm run start
```For another commands look to package.json
## Set enviroment for BE
- Rename .env.example to .env
```bash
# BE HOST
PORT=4000
SERVER_URL="http://localhost:4000"# FE HOST
ORIGIN="http://localhost:3000"# JWT settings
JWT_EXPIRATION="7d"
JWT_SECRET="youhavetochoseone"COOKIE_KEY="youhavetochoseone"
# DB URI
MONGO_URI="mongodb://{user}:{password}@{host}:{port}/{databaseName}"# Emails
SENDGRID_KEY="set if you want have notification for order or contact from https://sendgrid.com (ADMIN_EMAILS and user will get notification)"# Images
CLOUDINARY_NAME="set name from cloudinary api https://cloudinary.com (for images upload)"
CLOUDINARY_KEY="set key from cloudinary api https://cloudinary.com (for images upload)"
CLOUDINARY_SECRET="set secret from cloudinary api https://cloudinary.com (for images upload)"# Pay
STRIPE_PUBLISHABLE_KEY="set for paying with card for orders with stripe https://stripe.com"
STRIPE_SECRETKEY="set for paying with card for orders with stripe https://stripe.com"# Google login
GOOGLE_CLIENT_ID="set for google login activation"
GOOGLE_CLIENT_SECRET="set for google login activation"# Admin emails get notification from sendgrid when order or contact are submitted
ADMIN_EMAILS="[email protected], [email protected]"# Recaptcha server key from google
RECAPTCHA_SERVER_KEY="RECAPTCHA_SERVER_KEY"# Get location from IP - https://geolocation-db.com
GEO_LOCATION_API_KEY="GEO_LOCATION_API_KEY"# FE ENV SEND FROM BE
FE_STRIPE_PUBLISHABLE_KEY="FE_STRIPE_PUBLISHABLE_KEY"
FE_TINYMCE_API_KEY="FE_TINYMCE_API_KEY"
FE_RECAPTCHA_CLIENT_KEY="FE_RECAPTCHA_CLIENT_KEY"
```
## Docker```bash
# pull docker
docker pull pararel/eshop-mean:latest# run docker with env file
docker run --env-file $PathToEnv --network=host pararel/eshop-mean:latest# run docker with env set in cmd line
docker run --e MONGO_URI=mongodbUrl --e OTHER_ENV=otherEnvValue --network=host pararel/eshop-mean:latest```