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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Keep the build context small and secret-free.
**/node_modules
**/dist
**/build
**/.turbo
**/*.tsbuildinfo
**/coverage
.git
.github
**/.env
**/.env.*
!**/.env.example
neo4j_data
**/*.log
assets
docs
.idea
.vscode
.DS_Store
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
56 changes: 56 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# ─────────────────────────────────────────────────────────────────────────────
# Solarch OSS self-host configuration.
#
# Easiest: run ./install.sh (Linux/macOS) or ./install.ps1 (Windows) — an interactive
# wizard that fills this file for you. Or copy this to `.env`, edit, then:
# docker compose up --build → http://localhost:3000
#
# Only Neo4j + one AI provider are required.
# ─────────────────────────────────────────────────────────────────────────────

PUBLIC_URL=http://localhost:3000
PORT_PUBLIC=3000

# ── Exposure / network (security) ────────────────────────────────────────────
# Local (default): only this machine can reach the app.
BIND_ADDRESS=127.0.0.1
# LAN / VPS: set BIND_ADDRESS=0.0.0.0 AND enable basic auth below (install.sh option 2).
# SOLARCH_BASIC_AUTH_USER=
# SOLARCH_BASIC_AUTH_HASH= # bcrypt from: caddy hash-password --plaintext 'your-password'

# Rate limits (server-side; per IP by default in OSS mode)
# THROTTLE_BY=ip
# THROTTLE_LIMIT=60
# THROTTLE_TTL_MS=60000
# AI_THROTTLE_LIMIT=20
# CODEGEN_FILL_THROTTLE_LIMIT=10

# ── Database (Neo4j) ─────────────────────────────────────────────────────────
NEO4J_PASSWORD=change_me_please

# ── Local owner identity (no login screen) ───────────────────────────────────
LOCAL_USER_ID=local_owner

# ── AI provider — pick ONE and set its key ───────────────────────────────────
# Provider ids: openai | anthropic | google | deepseek | mistral | groq |
# openrouter | ollama | bedrock | openai-compatible
LLM_GENERATION_PROVIDER=openai
LLM_CHAT_PROVIDER=openai
# LLM_MODEL=gpt-4o

OPENAI_API_KEY=sk-xxxxxxxx
# ANTHROPIC_API_KEY=sk-ant-...
# GOOGLE_API_KEY=...
# DEEPSEEK_API_KEY=...
# MISTRAL_API_KEY=...
# GROQ_API_KEY=...
# OPENROUTER_API_KEY=...
# OLLAMA_BASE_URL=http://host.docker.internal:11434
# BEDROCK_API_KEY=
# BEDROCK_BASE_URL=
# LLM_API_KEY=
# LLM_BASE_URL=

# ── Embeddings (GraphRAG) — local by default ────────────────────────────────
# EMBED_PROVIDER=local
# EMBED_MODEL=Xenova/paraphrase-multilingual-MiniLM-L12-v2
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default owners for everything in the repo.
* @fatalerrorist
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ["https://solarch.dev"]
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Bug report
description: Something is broken or behaves unexpectedly.
labels: ["bug"]
body:
- type: markdown
attributes:
value: Thanks for the report. Please include enough detail to reproduce.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear description of the bug, plus what you expected instead.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
placeholder: |
1. Go to ...
2. Click ...
3. See error
validations:
required: true
- type: dropdown
id: area
attributes:
label: Area
options:
- web (canvas / UI)
- server (API / Neo4j)
- codegen / AI
- self-host (docker)
- other
validations:
required: true
- type: textarea
id: env
attributes:
label: Environment
description: Hosted app or self-host? Browser, OS, Node version, commit if known.
- type: textarea
id: logs
attributes:
label: Logs / screenshots
description: Console output, server logs, or a screen recording help a lot.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/solarch-dev/solarch/discussions
about: Questions, ideas, design feedback, and architecture discussion.
- name: Try Solarch
url: https://app.solarch.dev
about: The hosted app — no install required.
- name: Commercial licensing
url: mailto:info@solidea.tech
about: Commercial use inquiries (PolyForm Noncommercial covers non-commercial use).
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Feature request
description: Suggest an idea or improvement.
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: Describe the use case or pain point, not just the solution.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: What you'd like to happen. Sketches/mockups welcome.
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Thanks for contributing to Solarch. Keep PRs focused. -->

## What & why

<!-- What does this change, and what problem does it solve? Link any issue (#123). -->

## Changes

-

## Checks

- [ ] `pnpm build` passes (web + server)
- [ ] `pnpm --filter @solarch/server test:unit` passes (if the server changed)
- [ ] Conventional commit subject, no emojis
- [ ] No secrets or `.env` files committed
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

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

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10.0.0

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: OSS grep gate
run: |
set -euo pipefail
if rg -i 'clerk|polar|posthog|ClerkAuthGuard|BILLING_ENABLED|isLocalAuth|Henüz lisanslanmadı|misafir bileti' apps docs deploy --glob '!**/.github/**'; then
echo "OSS grep gate failed — SaaS remnants found"
exit 1
fi
if rg '[ğüşıöçĞÜŞİÖÇ]' apps/server/src apps/server/test apps/server/deploy apps/server/README.md apps/server/scripts --glob '!**/.tr-en-cache.json'; then
echo "Turkish characters found under apps/server"
exit 1
fi

- name: Build server
working-directory: apps/server
env:
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: test
LLM_GENERATION_PROVIDER: openai
LLM_CHAT_PROVIDER: openai
OPENAI_API_KEY: test
run: pnpm build

- name: Build web
run: pnpm build:web

- name: Server unit tests
working-directory: apps/server
env:
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: test
LLM_GENERATION_PROVIDER: openai
LLM_CHAT_PROVIDER: openai
OPENAI_API_KEY: test
run: pnpm test:unit

e2e:
runs-on: ubuntu-latest
needs: verify
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10.0.0

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Server e2e tests
working-directory: apps/server
env:
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: test
LLM_GENERATION_PROVIDER: openai
LLM_CHAT_PROVIDER: openai
OPENAI_API_KEY: test
PORT: 4444
CORS_ORIGIN: http://localhost:3000
NODE_ENV: test
run: pnpm test:e2e
31 changes: 30 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Dependencies
node_modules/
.pnpm-store/

# Build output
dist/
build/
*.tsbuildinfo

# Turborepo
.turbo/

# Environment (keep .env.example tracked)
.env
.env.local
.env.*
!.env.example

# Logs
*.log
npm-debug.log*
pnpm-debug.log*

# Test / coverage
coverage/
.nyc_output/

# Neo4j local data
neo4j_data/

# Editor / OS
.idea/
.DS_Store
Thumbs.db
*.swp
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
42 changes: 42 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a
harassment-free experience for everyone, regardless of age, body size, visible or invisible
disability, ethnicity, sex characteristics, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best for the overall community

Examples of unacceptable behavior:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the
maintainers at **[info@solidea.tech](mailto:info@solidea.tech)**. All complaints will be
reviewed and investigated promptly and fairly. Maintainers are obligated to respect the
privacy and security of the reporter of any incident.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
version 2.1.
Loading
Loading