Skip to content
Merged
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
25 changes: 25 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# WEB4 Engine — Environment Variables
# Copy to .env and fill in values

# Engine
MZC_ENGINE_NAME=WEB4_BLACK_MUCIZEWORK
MZC_ENGINE_MODE=BLACK
MZC_API_VERSION=1.0
MZC_PORT=5002

# Security
MZC_JWT_SECRET=
MZC_CORS_ORIGINS=*

# Storage
MZC_DATABASE_URL=json://storage/db/db.json

# Solana
MZC_RPC_URL=https://api.devnet.solana.com

# Redis
MZC_REDIS_URL=

# Observability
MZC_LOG_LEVEL=INFO
MZC_LOG_FORMAT=json
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/architecture_proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Architecture Proposal
about: Propose an architectural change or decision
title: "[ARCH] "
labels: architecture
assignees: ""
---

## Context

What is the current situation?

## Problem Statement

What problem needs to be solved?

## Proposed Architecture

Describe the proposed change.

## Trade-offs

What are the trade-offs of this approach?

## Alternatives

What alternatives were considered?
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug Report
about: Report a bug or unexpected behavior
title: "[BUG] "
labels: bug
assignees: ""
---

## Description

A clear description of the bug.

## Steps to Reproduce

1.
2.
3.

## Expected Behavior

What should have happened.

## Actual Behavior

What actually happened.

## Environment

- OS:
- Python:
- API Version:
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Documentation
about: Report missing or incorrect documentation
title: "[DOCS] "
labels: documentation
assignees: ""
---

## What is missing or incorrect?

Describe the documentation issue.

## Where?

Which file or section?

## Suggested Improvement

How should the documentation be improved?
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: "[FEATURE] "
labels: enhancement
assignees: ""
---

## Problem

What problem does this solve?

## Proposed Solution

Describe your proposed approach.

## Alternatives Considered

What other approaches were considered?

## Additional Context

Any other relevant information.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/performance_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Performance Issue
about: Report a performance problem
title: "[PERF] "
labels: performance
assignees: ""
---

## Description

What performance issue did you observe?

## Metrics

- Latency:
- Throughput:
- Resource usage:

## Reproduction

Steps to reproduce the issue.

## Expected Performance

What performance level is expected?
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/security_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Security Report
about: Report a security concern (non-critical)
title: "[SECURITY] "
labels: security
assignees: ""
---

## Description

Describe the security concern.

## Impact

What is the potential impact?

## Suggested Fix

How should this be addressed?

**For critical vulnerabilities, do NOT use this template. Contact [email protected] directly.**
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Summary

Brief description of changes.

## Type

- [ ] Feature
- [ ] Bug fix
- [ ] Refactor
- [ ] Documentation
- [ ] CI/CD
- [ ] Security

## Changes

-

## Testing

- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing done

## Checklist

- [ ] Code follows project style
- [ ] Documentation updated
- [ ] No secrets committed
- [ ] CHANGELOG updated
47 changes: 47 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
- name: bug
color: d73a4a
description: Something is not working

- name: enhancement
color: a2eeef
description: New feature or request

- name: documentation
color: 0075ca
description: Documentation improvements

- name: api
color: e4e669
description: API related changes

- name: smart-contract
color: 9945FF
description: Anchor/Solana program changes

- name: security
color: b60205
description: Security related

- name: good first issue
color: 7057ff
description: Good for newcomers

- name: help wanted
color: 008672
description: Extra attention is needed

- name: breaking change
color: d93f0b
description: Breaking API or interface change

- name: architecture
color: 5319e7
description: Architecture decisions

- name: performance
color: fbca04
description: Performance improvements

- name: ci-cd
color: 1d76db
description: CI/CD pipeline changes
29 changes: 29 additions & 0 deletions .github/workflows/anchor-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Anchor Build

on:
push:
paths: ["programs/**"]
pull_request:
paths: ["programs/**"]

jobs:
build:
name: Anchor Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Solana CLI
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install Anchor
run: cargo install --git https://github.com/coral-xyz/anchor avm --force
- name: Build
run: |
if [ -d "programs" ] && [ "$(ls -A programs)" ]; then
anchor build
else
echo "No programs to build yet"
fi
29 changes: 29 additions & 0 deletions .github/workflows/anchor-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Anchor Test

on:
push:
paths: ["programs/**", "tests/**"]
pull_request:
paths: ["programs/**", "tests/**"]

jobs:
test:
name: Anchor Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Solana CLI
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install Anchor
run: cargo install --git https://github.com/coral-xyz/anchor avm --force
- name: Test
run: |
if [ -d "programs" ] && [ "$(ls -A programs)" ]; then
anchor test
else
echo "No programs to test yet"
fi
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI Pipeline

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

jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install ruff black
- name: Ruff
run: ruff check .
- name: Black
run: black --check .

typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -r requirements.txt mypy
- name: MyPy
run: mypy apps/ services/ packages/ --ignore-missing-imports

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -r requirements.txt -r requirements-dev.txt
- name: Pytest
run: pytest tests/ -v --cov=apps --cov=services --cov=packages --cov-report=term-missing

security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install bandit
- name: Bandit
run: bandit -r apps/ services/ packages/ -ll

docker:
name: Docker Build
runs-on: ubuntu-latest
needs: [lint, test, security]
steps:
- uses: actions/checkout@v4
- name: Build
run: docker build -f docker/Dockerfile -t web4-engine:test .
Loading
Loading