A Turborepo with Lens data Analytics (postgres database) + Next.js powered by docker and docker-compose.
This turborepo uses Yarn as a package manager. It includes the following packages/apps:
api
: backendweb
: frontenddata
: constants shared by appsdb
: sequelize models shared by appsui
: a stub React component library shared by appseslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
Please make sure you have Docker and docker-compose installed in your machine. Please refer here to install them :
- Docker installation
- Docker compose installation
- Clone this repository and change directory:
git clone git@github.com:codingtalent/lentics.git
- Setup web/api configuration (
.env
). Create a .env file which stores postgres configuration, based on the .env.example file:
# lentics
cd apps/web
cp .env.example .env
cd ../api
cp .env.example .env
- Prepare database files
# lentics
cd db
unzip db-v0.0.1.zip
- To develop all apps and packages, run the following command:
# lentics
docker-compose up -d
- Default access URL
http://localhost: 3000 #web
http://localhost: 3001 #api
- To build all apps and packages, run the following commands:
# lentics
docker exec -it lentics-turbo-1 /bin/sh
Then run:
yarn build
To avoid build failures, please stash the changes for package.json before build new container. Please also submit new files in the npm-packages-offline-cache directory to git if package.json has new dependencies.
- CLI Usage for turbo Command-Line Reference
- ESLint for code linting
- Prettier for code formatting
- Next.js
- Tailwind CSS
- wagmi / ethers for Ethereum Hooks
- Apollo for GraphQL server and client
- Sequelize ORM