Skip to content

Zenoo/labrute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,996 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowdin

Backend

Made with Node.js, Express, Prisma, written in Typescript.

Frontend

Made with MUI's components, React and create-react-app.

Contributing

  • Fork this project

  • Make sure your NodeJS and pnpm versions are up to date

  • If you are using Windows, make sure to use Git Bash as your terminal

  • Setup your local Postgres databases (labrute + etwin)

  • Copy .env.sample to .env and adapt the variables

  • Optional: Create an eternaltwin.local.toml config file for Eternaltwin. You don't need it to start LaBrute, but it may be useful for more advanced usage. (An example is provided in the eternaltwin.local.toml.sample file)

  • Install dependencies: pnpm i

  • Generate the DB schema: pnpm db:sync:dev

  • Compile the sources: pnpm compile

  • Seed your database (optional, but useful for development): pnpm db:seed

  • Make sure to initialize your etwin database by running pnpm eternaltwin db sync

  • Start the server, client and etwin local server with pnpm dev

  • Important: Disable your adblocker for the local development environment, as it may block fingerprint requests

  • Commit and push your changes

  • Create a pull request to merge your fork into main

How to sync your database with your new Prisma schema

  • Run pnpm db:sync:dev

How to seed your database

  • Edit server/src/seed.ts

  • Run pnpm db:seed

pnpm troubleshooting

If you encounter issues running pnpm scripts, change your config with the following commands:

# This will allow setting env variables in the scripts section of package.json, which is required for some scripts to work properly
pnpm config set shellEmulator true
# This will set the script shell to git bash, which prevents issues with the default cmd.exe on windows
# Adapt the path to your git bash executable if it's different
pnpm config set scriptShell "C:\\Program Files\\git\\bin\\bash.exe"

Deployment

  • Set the environment variables

  • Install dependencies: pnpm install --frozen-lockfile

  • Compile sources: pnpm build

  • Sync your database with pnpm db:sync:prod

  • Start the server with pnpm start

  • Deploy the frontend using a static server of your choice like Nginx

  • Environment variables can be overriden without restarting the server by setting them in the database Config table

Editing core

  • Make sure to run pnpm core:export after creating/deleting files in the core package, as it will update the indexes accordingly

Generate the sound spritesheet after editing a sound using audiosprite

  • Requirements: install ffmpeg on your Pc, node v18 minimum

  • Run the script : pnpm sfx:generate if you use git bash and pnpm sfx:wsl:generate if you use WSL

Sitemap

  • After editing any of the main Google accessible pages, run pnpm sitemap:generate to update the sitemap

File Structure

├── client
│	├── build    			# Compiled frontend
│	├── public
│	│	├── i18n			# Folder containing all the translations
│	│	└── ...      		# Any other static file
│	└── src
│		├── components 		# Reusable components
│		├── hooks     		# React hooks
│		├── layouts    		# Layouts
│		├── theme     		# Theme variables
│		├── utils       	# Utility functions
│		└── views       	# Views
├── core 					# Shared ressourcs for both front and back end
│   ├── src
├── prisma 					# Prisma types definitions for both front and back end
│   ├── src
└── server 					# Back end
    ├── prisma              # DB
	└── src
	    ├── controllers     # Controllers
 	  	├── utils       	# Utility functions
	    └── ...

📜 License

This project uses a dual licensing structure:

Both licenses prohibit commercial use. You are free to use, modify, and distribute this project for personal, educational, or non-profit purposes, but any commercial use is forbidden.

⚠️ Web3/Crypto/Blockchain Use Explicitly Prohibited

This project is NOT available for use in any Web3, cryptocurrency, blockchain, NFT, or distributed ledger technology projects.

Any use in connection with cryptocurrencies, blockchain technologies, NFTs, DeFi, DAOs, or any other web3-related projects is strictly forbidden. This includes but is not limited to:

  • Cryptocurrency exchanges, wallets, or payment systems
  • NFT marketplaces, minting platforms, or collections
  • Blockchain networks or distributed ledger implementations
  • Decentralized finance (DeFi) protocols or applications
  • Decentralized autonomous organizations (DAOs)
  • Smart contracts or dApps on any blockchain
  • Any project that integrates with, promotes, or facilitates cryptocurrency or blockchain technology

Violation of this restriction will be considered a breach of the license terms.