Coder Social home page Coder Social logo

y-moshe / toyz Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.66 MB

Toyz (Toys shop), an e-commerce application built with WebAPI using C# and .NET Framework.

Home Page: https://toyz-project.shop/

C# 29.62% TypeScript 47.63% HTML 18.74% SCSS 4.02%

toyz's Introduction

Getting started

Setup

Server - Docker containers & HTTPS

  1. Run the command dotnet dev-certs https --trust in the root directory of the project. For Linux, follow the instructions Here.
  2. Run docker-compose up -d in the root directory of the project to add Redis container and PostgreSQL Database.

Environment variables

The application uses "Secret manager" More info can be found here

  1. cd into API project and run the following commands to set up the secret keys for this app:
  2. dotnet user-secrets set "StripeSettings:SecretKey" "[Value]"
  3. dotnet user-secrets set "StripeSettings:PublishableKey" "[Value]"
  4. dotnet user-secrets set "StripeSettings:WebhookEndpointSecret" "[Value]"

These commands will create a secrets.json on your local machine that will be used for this app!
And as mentioned in the documentation, that will be stored in:

  • For windows - %APPDATA%\Microsoft\UserSecrets\40b43269-683b-41a0-9485-2385ec3ce3dc\secrets.json
  • For Linux/macOs - ~/.microsoft/usersecrets/40b43269-683b-41a0-9485-2385ec3ce3dc/secrets.json

Client - HTTPS/SSL & Environment

HTTPS/SSL

  1. Create a ssl folder in the root directory of the "Client" project.
  2. Use https://github.com/FiloSottile/mkcert to generate certificate keys.
  3. Next, cd into ssl folder and run the command mkcert -install and confirm installation, then run the command mkcert localhost
  4. Restart any opened browsers!

Environment variables

  1. Create .env file in the root directory of the "Client" project.
  2. Fill the required environment variables. (use .env.example to see the variables that the app uses)

Edit mode

In both, API appsettings.json project and Client environments folder, there is a "Edit Mode" trigger in the environment variables to control adding and updating shop products, this only for convenience and should use in development only.

toyz's People

Contributors

y-moshe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.