Skip to content

MarcOreliOoo/demyth

Repository files navigation

Demyth Logo

Welcome on the main repository for DeMyth's project.

license PRs welcome made with hearth by MarcOreliOoo

πŸ“‹ Table of Contents

  1. πŸ”± What is Demyth?
  2. πŸ”¨ Installation
  3. βš™οΈ Stack
  4. πŸš€ Build
  5. 🐳 Docker
  6. πŸ’― Tests
  7. 🌿 Env variables
  8. β˜‘οΈ Code analysis and consistency
  9. πŸ“ˆ Releases & Changelog
  10. πŸ™ GitHub Actions
  11. ✨ Misc commands
  12. ©️ License
  13. ❀️ Contributors

Demyth is a strategy-based web3 browser game, inspired by mythology, where players compete to ascend the rankings. In addition to the game, this project aims to integrate a variety of common full-stack tools, as we will discuss further.

First you need to fork/download the monorepo. Secondly, you need these:

Soft Note
NODE It is better to have node >= 18.10; if no upgrade it - v18.17.1
YARN
Nest Better to install cli globaly: npm i -g @nestjs/cli

Then, in the root of the monorepo project:

# Install all monorepo's dependencies
yarn install

Frontend

What Why
NEXT
TypeScript
tailwindcss
SHADCNUI Component library
web3Modal All web3modal suff: wagmi, wallet connecct, viem, siwe
framermotion Animation purpose
Tailwind Utility twMerge, clsx, cva
Auth web2 & web3 login with jwt session

Backend

NEST TypeScript MONGODB MONGOOSE

Blockchain

Hardhat Solidity

Soon - To come

Docker

In order to build the app for production, in the root, run the following command:

# Build the app
yarn build

# Run the app in production mode
yarn start:dev

This app will be Docker ready soon! The Dockerfile will be available at the root of the project.

πŸ”¨ Development mode

# Run the frontend in development mode - in frontend folder:
yarn dev

# Run the backend in development mode - in backend folder:
yarn start:dev

πŸš€ Production mode

# Run the frontend in development mode - in frontend folder:
yarn build
yarn start

# Run the backend in development mode - in backend folder:
yarn build
yarn start:prod

πŸ§ͺ Unit and E2E tests

Jest Mocha Chai

πŸ₯’ Acceptance tests

Cucumber

▢️ Commands

Before testing, you must follow the installation steps. Then, run one of the following commands:

#Soon

Environnement files are available in the env directory.

You can create a .env file in this directory to override the default values when starting the project locally.

Environment variables are:

Name Description Required Example value Limitations
HOST Host on which the API will be available βœ… http://localhost:3001
NEXT_PUBLIC_WALLETCONNECT_PROJECTID Wallet connect project ID βœ… 25654aeff98f7aaac5b9fff6...
NEXT_PUBLIC_SIGNIN_MESSAGE Message content to be sign when web3 login is used βœ… ❌
NEXTAUTH_SECRET Secret for NextAuth βœ… ❌
NEXTAUTH_URL Url for NextAuth βœ… http://localhost:3000
MONGODB_URL Atlas Mongodb URL βœ… ``mongodb+srv://....net/`
JSON_TOKEN_KEY Key for Jwt generation βœ… ❌
JSON_TOKEN_EXPIRE Expire time for Jwt βœ… 1d
JSON_REFRESH_TOKEN_KEY Key for Jwt generation βœ… ❌
JSON_REFRESH_TOKEN_EXPIRE Expire time for Jwt βœ… 7d
PORT Port for backend βœ… 3001

πŸ” Code linting & formatting

ESLint Prettier

This project uses GitHub Actions to automate some boring tasks.

You can find all the workflows in the .github/workflows directory.

🎒 Workflows

Workflows are onlky for frontend at the time.

Name Description & Status Triggered on
βš™οΈ Preview Workflow Various checks for app health, code quality and tests coverage push on develop and all pull requests to develop
πŸš€ Production Workflow Various checks for app health, code quality and tests coverage push on main and all pull requests to main

This project is licensed under the MIT License.

There is no contributor yet. Want to be the first?