/dragonstack

A full-stack e-commerce site with Actix, PostgreSQL, React, Redux, RESTful API, authentication to interact with dragons.

Primary LanguageRustMIT LicenseMIT

DragonStack

A full-stack e-commerce site with Actix, PostgreSQL, React, Redux, RESTful API, authentication to interact with dragons.

Getting Started

Visualized overview

Backend and gRPC Auth Server

Make sure an active instance of PostgresSQL is running with default port 5432, or here we start an instance with Docker.

Set up postgresql docker:

  1. Pull postgres docker image:

    docker pull postgres
  2. Start postgres service:

    docker run --name postgres \
        -p 5432:5432 \
        -e POSTGRES_USER="Your postgres Username" \
        -e POSTGRES_PASSWORD="Your postgres User Password" \
        -d  postgres
  3. Modify APP_SECRET string for hash encryption in confidential.rs (optional)

Start gRPC auth server:

RUST_BACKTRACE=1 RUST_LOG=info cargo run --bin ds-auth-grpc mono

Start backend server:

RUST_BACKTRACE=1 RUST_LOG=info,sqlx=error cargo run --bin ds DATABASE_URL=postgres://"Your postgres Username":"Your postgres User Password"@localhost:5432/dragonstack?sslmode=disable mono

Frontend

Start frontend application:

yarn dev

Build for production:

yarn build

Testing

There is currently no testing on this project.

Currently using typescript, eslint and prettier to improve code quality for development.

With husky's git hooks and lint-staged, automatically run prettier, eslint and typescript-eslint before pushing commits.

To manually start the check, run:

yarn format && yarn lint

Future tech

  • Typescript
  • Webpack bundle
  • redux-toolkit slice to rewrite redux structure
  • Functional Component with hooks to rewrite Class Component
  • prettier, eslint, husky, lint-staged
  • Nextjs
  • Jest
  • ...

Ideas on the Udemy course: Master Full-Stack Web Development | Node, SQL, React, & More