Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Howard86/dragonstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DragonStack

A full-stack e-commerce site with Java Spring Boot and Next.js to interact with dragons.

Getting Started

Prerequisites

Installing

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

docker run --name dragonstack-psql \
    -p 5432:5432 \
    -e POSTGRES_DB=dragonstack \
    -e POSTGRES_PASSWORD=mysecretpassword \
    -d postgres:9.6-alpine

For api server, to start a Spring Boot RESTful APIs service, run:

cd backend && ./gradlew bootRun

For website, to start a dev server with hot-reload, run:

cd frontend
yarn && yarn dev

Otherwise, to start a production SSR website, first build sites with webpack then start an express server to render the page, more details on Next.js - an opinionated react framework.

cd frontend
yarn && yarn build && yarn start

The website can be found on localhost:8080

Running the tests

There is currently no testing on this project.

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

With husky's git hooks helper and lint-stage linter helper, we automatically run prettier and eslint before commits, and do a type-check with typescript before pushing commits.

To manually start the check, run

yarn format && yarn lint && yarn type-check

Built With

  • Next.js v9.4.4 - Production grade React applications that scale. The world’s leading companies use Next.js by Vercel to build static and dynamic websites and web applications.
  • Spring Boot v2.3.1 - the world's most popular Java framework focusing on speed, simplicity, and productivity.

License

This project is licensed under the MIT License - see LICENSE for details

Acknowledgments