Skip to content

Latest commit

Β 

History

History
77 lines (61 loc) Β· 1.94 KB

File metadata and controls

77 lines (61 loc) Β· 1.94 KB

Citizen of Arcanis Banner

Citizen of Arcanis Backend

πŸ“Œ Prerequisites

Before starting the project, make sure you have the following tools installed:


πŸš€Installation

1️⃣ Clone the repository

git clone https://github.com/YOUR-USER/citizen-of-arcanis-backend.git
cd citizen-of-arcanis-backend

2️⃣ Install dependencies

npm install

3️⃣ Setup the environment

Create a .env file in the root of the project with the following content:

PORT=3000
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASS=password
DB_NAME=coa_database
JWT_SECRET=supersecretkey
CONTRACT_ADDRESS=0x040811bb6636316c9f1809e2898285976d2a0db66e33703defbfb0c7572b87ad
WALLET_ADDRESS=0x066EE9d5F6791270d7cD1314ddB9fc8f7EdCb59E2847e2b13D57A06e7c988D63
WALLET_PRIVATE_KEY=0x0363c39930af5bfd1890d94963a503fec02cc4965080517dc2888c1671a5e25a
STARKNET_NETWORK=sepolia-alpha

If you use Docker, simply run:

docker-compose -d

4️⃣ Run the server

npm run start:dev
start npm run: dev

πŸ“– Project structure

citizen-of-arcanis-backend/
│── src/
β”‚ β”œβ”€β”€ modules/
β”‚ β”‚ β”œβ”€β”€ auth/ # Authentication module (JWT)
β”‚ β”‚ β”œβ”€β”€ users/ # User management
β”‚ β”‚ β”œβ”€β”€ Marketplace/ # NFT management and economy
β”‚ β”‚ β”œβ”€β”€ game/ # Unity synchronization
β”‚ β”œβ”€β”€ common/ # Utilities and middlewares
β”‚ β”œβ”€β”€ main.ts # Entry point
│── .env # Variables environment
│── package.json # dependencies
│── tsconfig.json # TypeScript configuration
│── docker-compose.yml # Database and deployment