Skip to content

Commit e1f1882

Browse files
Generate PredictX scaffold
1 parent 67b7c7f commit e1f1882

51 files changed

Lines changed: 2914 additions & 78 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
NEXT_PUBLIC_STELLAR_NETWORK=testnet
2+
NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
3+
NEXT_PUBLIC_PREDICTX_CONTRACT_ID=
4+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Bug report
3+
about: Report a reproducible problem in PredictX
4+
title: "[Bug]: "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
11+
## Steps to Reproduce
12+
13+
## Expected Behavior
14+
15+
## Actual Behavior
16+
17+
## Environment
18+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest a feature or improvement
4+
title: "[Feature]: "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Problem
10+
11+
## Proposal
12+
13+
## Alternatives Considered
14+
15+
## Additional Context
16+

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
9+
- package-ecosystem: npm
10+
directory: /frontend
11+
schedule:
12+
interval: weekly
13+
open-pull-requests-limit: 5
14+
15+
- package-ecosystem: github-actions
16+
directory: /
17+
schedule:
18+
interval: weekly
19+
open-pull-requests-limit: 5
20+

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Summary
2+
3+
## Changes
4+
5+
## Testing
6+
7+
## Security Notes
8+

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
contracts:
14+
name: Soroban Contracts
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
targets: wasm32-unknown-unknown
24+
components: rustfmt,clippy
25+
26+
- name: Format
27+
run: cargo fmt --all -- --check
28+
29+
- name: Clippy
30+
run: cargo clippy --workspace --all-targets -- -D warnings
31+
32+
- name: Test
33+
run: cargo test --workspace
34+
35+
- name: Build WASM
36+
run: cargo build --manifest-path contracts/Cargo.toml --target wasm32-unknown-unknown --release
37+
38+
frontend:
39+
name: Frontend
40+
runs-on: ubuntu-latest
41+
defaults:
42+
run:
43+
working-directory: frontend
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Setup Node
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: 22
52+
cache: npm
53+
54+
- name: Install dependencies
55+
run: npm install
56+
57+
- name: Type check
58+
run: npm run test
59+
60+
- name: Lint
61+
run: npm run lint
62+
63+
- name: Build
64+
run: npm run build
65+

.github/workflows/security.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Security
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: "17 3 * * 1"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
audit:
16+
name: Dependency Audit
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
27+
- name: Install frontend dependencies
28+
working-directory: frontend
29+
run: npm install
30+
31+
- name: npm audit
32+
working-directory: frontend
33+
run: npm audit --audit-level=high
34+
35+
- name: Cargo audit placeholder
36+
run: echo "TODO: Install and run cargo-audit once the dependency policy is finalized."
37+

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# OS and editor files
2+
.DS_Store
3+
Thumbs.db
4+
.vscode/
5+
.idea/
6+
7+
# Rust
8+
target/
9+
*.wasm
10+
11+
# JavaScript
12+
node_modules/
13+
.next/
14+
out/
15+
dist/
16+
coverage/
17+
*.tsbuildinfo
18+
package-lock.json
19+
pnpm-lock.yaml
20+
yarn.lock
21+
22+
# Environment
23+
.env
24+
.env.*
25+
!.env.example
26+
27+
# Logs
28+
*.log
29+
npm-debug.log*
30+
yarn-debug.log*
31+
yarn-error.log*

CODE_OF_CONDUCT.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
We pledge to make participation in PredictX welcoming, respectful, and productive for everyone.
6+
7+
## Expected Behavior
8+
9+
- Be respectful and constructive.
10+
- Assume good intent while staying accountable for impact.
11+
- Keep discussions focused on the project and its users.
12+
- Welcome new contributors and explain context when needed.
13+
14+
## Unacceptable Behavior
15+
16+
- Harassment, intimidation, or discriminatory language
17+
- Personal attacks or sustained disruption
18+
- Publishing private information without consent
19+
- Abusive behavior in issues, pull requests, or community spaces
20+
21+
## Enforcement
22+
23+
Maintainers may remove content, close threads, or restrict participation when behavior harms the project community.
24+

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing to PredictX
2+
3+
Thanks for helping build PredictX. This project is in scaffold stage, so contributions should keep contracts, frontend code, and documentation easy to audit.
4+
5+
## Development Principles
6+
7+
- Keep prediction market business logic out of placeholder modules until the relevant milestone is approved.
8+
- Prefer small, reviewable pull requests.
9+
- Add tests with any behavior change.
10+
- Use explicit types at contract boundaries.
11+
- Avoid introducing dependencies without a clear security and maintenance reason.
12+
13+
## Local Setup
14+
15+
```bash
16+
npm install
17+
rustup target add wasm32-unknown-unknown
18+
npm run contracts:test
19+
npm run lint
20+
```
21+
22+
## Pull Requests
23+
24+
- Describe the user-facing or developer-facing change.
25+
- Link related issues when available.
26+
- Include screenshots for frontend UI changes.
27+
- Include contract test output for Soroban changes.
28+
- Do not include private keys, seed phrases, RPC secrets, or generated wallet credentials.
29+
30+
## Code Style
31+
32+
- Rust: `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`
33+
- TypeScript: strict mode, typed wallet boundaries, no unchecked `any`
34+
- TailwindCSS: prefer tokens and reusable components over one-off styling
35+

0 commit comments

Comments
 (0)