Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.glb filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI/CD Pipeline

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: |
npm install
cd apps/web && npm install --legacy-peer-deps
cd ../../packages/nft && npm install --legacy-peer-deps

- name: Lint
run: |
cd apps/web && npm run lint

- name: Build Web App
run: |
cd apps/web && npm run build

- name: Compile Smart Contracts
run: |
cd packages/nft && npm run compile

- name: Test Smart Contracts
run: |
cd packages/nft && npm run test

deploy-web:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'

- name: Install and Build
run: |
cd apps/web
npm install --legacy-peer-deps
npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apps/web/dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"configurations": [
{
"name": "Debug Mobile",
"request": "launch",
"type": "reactnative",
"program": "${workspaceFolder}/apps/mobile/index.js"
},
{
"name": "Debug Web",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/apps/web"
}
]
}
20 changes: 20 additions & 0 deletions .vscode/mtw.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"Three.js Scene Setup": {
"prefix": "three-scene",
"body": [
"import { Canvas } from '@react-three/fiber'",
"import { OrbitControls, Environment } from '@react-three/drei'",
"",
"export default function Scene() {",
" return (",
" <Canvas>",
" <ambientLight intensity={0.5} />",
" <Environment preset=\"city\" />",
" <OrbitControls />",
" ${1:// Your models here}",
" </Canvas>",
" )",
"}"
]
}
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.validate": ["javascript", "typescript", "glsl"],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true
}
}
11 changes: 11 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Optimize GLBs",
"type": "shell",
"command": "gltf-pipeline -i ${input} -o ${output} --draco.compressMeshes",
"problemMatcher": []
}
]
}
123 changes: 123 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Contributing to Meta The World

## Getting Started

### Prerequisites
- Node.js 18+
- npm or yarn
- Git

### Repository Setup

1. **Clone the repository**
```bash
git clone https://github.com/YouKnowZo/Meta_The_World.git
cd Meta_The_World
```

2. **Install dependencies**
```bash
npm install
```

## Branch Structure

- `main` - Development branch
- `master` - Production/stable branch with full project structure

## Development Workflow

### Working with Branches

The repository has two main branches:

- **master**: Contains the complete project structure with all apps, packages, and configurations
- **main**: Initial development branch

To work on the master branch:

```bash
# Fetch all branches
git fetch origin

# Switch to master branch
git checkout master

# Your branch should now track origin/master
git status
```

### Making Changes

1. Create a feature branch from master:
```bash
git checkout master
git checkout -b feature/your-feature-name
```

2. Make your changes and commit:
```bash
git add .
git commit -m "Description of your changes"
```

3. Push your feature branch:
```bash
git push -u origin feature/your-feature-name
```

### Pushing to Master

If you need to push directly to master (with proper permissions):

```bash
git checkout master
# Make your changes
git add .
git commit -m "Your commit message"
git push -u origin master
```

The `-u` flag sets up tracking between your local master branch and origin/master.

## Environment Variables

For smart contract development, you may need to set up environment variables:

Create a `.env` file in `packages/nft/`:

```
PRIVATE_KEY=your_private_key_here
POLYGONSCAN_API_KEY=your_api_key_here
```

**Note**: Never commit the `.env` file to the repository.

## Running the Project

### Web Application
```bash
cd apps/web
npm install --legacy-peer-deps
npm run dev
```

### Smart Contracts
```bash
cd packages/nft
npm install --legacy-peer-deps
npm run compile
npm run test
```

## Pull Request Process

1. Fork the repository
2. Create a feature branch from master
3. Make your changes
4. Ensure all tests pass
5. Submit a pull request to the master branch

## Questions?

For questions or support, please open an issue on GitHub.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 YouKnowZo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions Meta_The_World.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}
Loading