Skip to content

Commit 1c46712

Browse files
committed
So long, old repo, and thanks for all the fish.
Migrated RAPTR project into the company repository.
1 parent 88ba95a commit 1c46712

576 files changed

Lines changed: 68159 additions & 0 deletions

File tree

Some content is hidden

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

.dockerignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Documentation
2+
docs/
3+
mkdocs.yml
4+
site/
5+
6+
# Git & CI
7+
.git
8+
.github
9+
.gitignore
10+
11+
# IDE & editor
12+
.vscode
13+
.idea
14+
*.swp
15+
16+
# Python artifacts
17+
__pycache__
18+
*.pyc
19+
.pytest_cache
20+
.ruff_cache
21+
backend/.venv
22+
23+
# Frontend dev artifacts
24+
frontend/node_modules
25+
26+
# Misc
27+
*.md
28+
LICENSE
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug Report
3+
about: Report something that isn't working correctly
4+
title: ""
5+
labels: bug, needs-triage
6+
assignees: ""
7+
---
8+
9+
## Description
10+
11+
A clear description of the bug.
12+
13+
## Steps to Reproduce
14+
15+
1. Go to ...
16+
2. Click on ...
17+
3. See error
18+
19+
## Expected Behavior
20+
21+
What should have happened.
22+
23+
## Actual Behavior
24+
25+
What happened instead.
26+
27+
## Environment
28+
29+
- **Raptr version**: (e.g., v0.1.0 or commit hash)
30+
- **Browser**: (e.g., Chrome 120, Firefox 121)
31+
- **OS**: (e.g., Windows 11, macOS 14, Ubuntu 24.04)
32+
- **Deployment**: (e.g., Docker, local dev)
33+
34+
## Screenshots / Logs
35+
36+
If applicable, add screenshots or paste error logs.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: ""
5+
labels: feature, needs-triage
6+
assignees: ""
7+
---
8+
9+
## Description
10+
11+
A clear description of the feature you'd like.
12+
13+
## Use Case
14+
15+
Why do you need this? What problem does it solve?
16+
17+
## Proposed Solution
18+
19+
How do you think it should work? (Optional — feel free to leave blank if unsure.)
20+
21+
## Alternatives Considered
22+
23+
Have you considered any alternative solutions or workarounds?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## What
2+
3+
Brief description of the changes.
4+
5+
## Why
6+
7+
What problem does this solve? Link related issues (e.g., `Closes #42`).
8+
9+
## How
10+
11+
Key implementation details or decisions worth noting.
12+
13+
## Checklist
14+
15+
- [ ] I have tested my changes locally
16+
- [ ] Backend: `uv run ruff check .` and `uv run ruff format --check .` pass
17+
- [ ] Backend: `uv run pytest` passes (if backend changes)
18+
- [ ] Frontend: `bun run lint` passes (if frontend changes)
19+
- [ ] Frontend: `bun run build` passes (if frontend changes)
20+
- [ ] I have updated documentation if needed
21+
22+
## Breaking Changes
23+
24+
_None_ (or describe what breaks and how to migrate)

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
8+
jobs:
9+
backend-checks:
10+
runs-on: ubuntu-latest
11+
12+
defaults:
13+
run:
14+
working-directory: ./backend
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python 3.14
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.14"
23+
24+
- name: Install uv
25+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
26+
27+
- name: Install dependencies
28+
run: uv sync --frozen
29+
30+
- name: Lint with Ruff
31+
run: uv run ruff check .
32+
33+
- name: Format check with Ruff
34+
run: uv run ruff format --check .
35+
36+
- name: Run tests
37+
run: uv run pytest
38+
39+
frontend-checks:
40+
runs-on: ubuntu-latest
41+
42+
defaults:
43+
run:
44+
working-directory: ./frontend
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up Bun
50+
uses: oven-sh/setup-bun@v2
51+
52+
- name: Install dependencies
53+
run: bun install --frozen-lockfile
54+
55+
- name: Lint and format check
56+
run: bun run lint
57+
58+
- name: Type check and build
59+
run: bun run build
60+
61+
# security-scan:
62+
# name: Security Scan (zizmor)
63+
# runs-on: ubuntu-latest
64+
# permissions:
65+
# contents: read
66+
# security-events: write
67+
# actions: read
68+
# steps:
69+
# - uses: actions/checkout@v4
70+
# with:
71+
# persist-credentials: false
72+
# - name: Run zizmor
73+
# uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d
74+
# with:
75+
# inputs: .
76+
77+
docker-build-check:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v4
81+
82+
- name: Set up Docker Buildx
83+
uses: docker/setup-buildx-action@v3
84+
85+
- name: Build Docker Image (Dry Run)
86+
uses: docker/build-push-action@v5
87+
with:
88+
context: .
89+
file: Dockerfile
90+
push: false
91+
tags: raptr:test

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy docs to GitHub Pages
2+
on:
3+
workflow_dispatch: # manual trigger only until GitHub Pages is available
4+
5+
permissions:
6+
contents: write
7+
8+
concurrency:
9+
group: "pages"
10+
cancel-in-progress: false
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Configure Git Credentials
19+
run: |
20+
git config user.name github-actions[bot]
21+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
22+
23+
- name: Setup uv
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
version: "latest"
27+
28+
- name: Set up Python
29+
run: uv python install 3.14
30+
31+
- name: Install dependencies
32+
working-directory: ./backend
33+
run: uv sync --all-groups
34+
35+
- name: Build docs
36+
run: cd backend && uv run zensical build --config-file ../docs/zensical.toml
37+
38+
- name: Deploy to GitHub Pages
39+
run: cd backend && uv run zensical gh-deploy --config-file ../docs/zensical.toml --force

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "main" ]
7+
tags:
8+
- 'v*'
9+
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Log in to the Container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata (tags, labels) for Docker
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
tags: |
39+
type=ref,event=tag
40+
type=raw,value=latest
41+
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Build and push Docker image
46+
uses: docker/build-push-action@v5
47+
with:
48+
context: .
49+
push: true
50+
tags: ${{ steps.meta.outputs.tags }}
51+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Stage 1: Build the frontend
2+
FROM oven/bun:1 AS frontend-builder
3+
4+
WORKDIR /app/frontend
5+
6+
# Copy package files
7+
COPY frontend/package.json frontend/bun.lock ./
8+
9+
# Install dependencies
10+
RUN bun install --frozen-lockfile
11+
12+
# Copy source code
13+
COPY frontend .
14+
15+
# Build the application
16+
# Set NODE_ENV to production for the build process
17+
# This ensures Bun loads .env.production if present, and tools behave in production mode
18+
RUN NODE_ENV=production bun run build
19+
20+
# Stage 2: Setup the backend and serve
21+
FROM python:3.14-slim AS backend-runner
22+
23+
WORKDIR /app
24+
25+
# Install uv
26+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
27+
28+
# Copy backend dependency files
29+
COPY backend/pyproject.toml backend/uv.lock ./
30+
31+
# Install dependencies
32+
# --frozen ensures we use the exact versions from uv.lock
33+
# --no-dev excludes development dependencies
34+
RUN uv sync --frozen --no-dev
35+
36+
# Install openssl for certificate generation
37+
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
38+
39+
# Place executables in the environment at the front of the path
40+
ENV PATH="/app/.venv/bin:$PATH"
41+
42+
# Copy backend source code
43+
COPY backend/app ./app
44+
COPY entrypoint.sh ./entrypoint.sh
45+
RUN chmod +x ./entrypoint.sh
46+
47+
# Copy built frontend assets from the previous stage
48+
# We place them in a 'static' directory inside the app or a sibling directory
49+
# Adjusting to copy to /app/static for easier serving
50+
COPY --from=frontend-builder /app/frontend/dist /app/static
51+
52+
# Expose the port
53+
EXPOSE 8000
54+
55+
# Run the application using the entrypoint script
56+
CMD ["/app/entrypoint.sh"]

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# RAPTR
2+
RAPTR is an open-source, API-enabled collaboration platform for Red and Purple Team engagements. It bridges the gap between offensive and defensive teams by allowing you to plan campaigns, log attacks and detections side-by-side, evaluate the results, and generate high-quality reports.
3+
4+
## Documentation
5+
Head over to the [docs](https://raptr.app) for detailed documentation.
6+
7+
## Quick Start
8+
To start using RAPTR locally, you can use the following command:
9+
10+
```bash
11+
docker run -d \
12+
--name raptr \
13+
-p 8000:8000 \
14+
-e DB_ENGINE=sqlite \
15+
-e SQLITE_DB_PATH=/data/raptr.db \
16+
-e TLS_ENABLED=false \
17+
-e ADMIN_EMAIL=admin@raptr.app \
18+
-e ADMIN_PASSWORD=your-secure-password \
19+
-v raptr_data:/data \
20+
ghcr.io/CompassSecurity/raptr:latest
21+
```
22+
23+
## Sandobx
24+
A sandbox playground is available at [https://sandbox.raptr.app/](https://sandbox.raptr.app/).
25+
26+
## Project Structure
27+
28+
- `backend/`: Python FastAPI application.
29+
- `frontend/`: Vue 3 + Vite application.
30+
- `docs/`: Documentation which is used to generate the static documentation website at [https://raptr.app](https://raptr.app).
31+
- `example templates/`: Example templates for RAPTR
32+
- `Dockerfile`: Configuration for building the RAPTR single-container deployment
33+
- `docker-compose.yml`: Example compose file for local deployment

0 commit comments

Comments
 (0)