A web store where you can design and buy your own family tree, engraved in wood with a laser
Explore the docs »
·
Report Bug
·
Request Feature
·
Treecreate webstore is a monorepo consisting of multiple apps working together
Key points
- An api built with Java Springboot, with MySQL for persistance
- A frontend app built with Angular
- All apps are contained within a NX monorepo for easy management
This project is an improved version of our previous repository, with the frontend and backend split into separate apps.
- NX - a modern mono-repo generation and management tool
- Java Springboot and a NX schematic for it
- Angular
The repository is made as a monorepo using NX. The applications are located in the /apps directory
In order to run this project locally and develop it, you need to have Node and JDK 11 installed.
We strongly suggest installing Node via NVM.
It allows easy updates of Node, which is critical for NX to work properly. We develop using the latest stable releases.
We develop with Java 11. Make sure your JDK is >= 11.
- npm
npm install npm@latest -g
- nx
npm install -g nx
Commits are made with git-cz
, a wrapper for git commit
npm install -g git-cz
If you install it locally, you will have to use npx git cz
instead
git clone https://github.com/treecreate/webstore.git
The API requires the following Envirnonment variables to run. Not all variables need to have values but have to exist.
TREECREATE_JDBC_URL
- url for connecting to the database. Follows a format of jdbc:mysql://username:password@hostname:port/schema?serverTimezone\=UTC&characterEncoding\=UTF-8
TREECREATE_MAIL_PASS
- password for the mail provider
Only needed for sending emails
TREECREATE_QUICKPAY_API_KEY
- api key for the Quickpay account
Only needed for processing payment-related data
TREECREATE_QUICKPAY_PRIVATE_KEY
- private key for the Quickpay account
Only needed for processing payment-related data
TREECREATE_SENTRY_DSN
- DSN key for Sentry, a logging service. Leave blank to not send any data
SHIPMONDO_URL
- https://app.shipmondo.com/api/public/v3
Only needed for processing shipping information
SHIPMONDO_TOKEN
- Shipmondo api key. Follows instrucions in shipmondo documentation to obtain and format it properly (should look like so: Basic base64enconded-username:password
)
Only needed for processing shipping information
Serving API with IntelliJ Idea
When run through Intellij Idea, set the variables in the run configuration.
Serving API with NX
When run with NX, create a .env
file in the root directory and fill out values based on the .env.template file.
Once you create and fill out the .env
file, you can serve the api with the following command:
nx serve api
Serving API with Visual Studio Code
Running through Visual Studio Code is not tested and depends on what java extension you use.
npm install
- Serve the frontend apps via NX
nx serve webstore
nx serve admin-page
The api features auto-generated documentation using Swagger UI.
It can be accessed at localhost:5050/docs
when the api is running
Are you interested how we set up the project and what commands we used? Checkout our setup guide
Email: info@treecreate.dk
Facebook
Instagram
Distributed under the BSD-3-Clause License. See LICENSE for more information.