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
218 changes: 188 additions & 30 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig } from 'vitepress'

function nav() {
function navEn() {
return [
{ text: 'Tutorial', link: '/tutorials/getting-started', activeMatch: 'tutorials/' },
{ text: 'How-to', link: '/how-to/add-new-domain', activeMatch: 'how-to/' },
{ text: 'Explanation', link: '/explanation/architecture', activeMatch: 'explanation/' },
{ text: 'Reference', link: '/reference/configuration', activeMatch: 'reference/' },
{ text: 'Tutorial', link: '/tutorials/getting-started', activeMatch: '/tutorials/' },
{ text: 'How-to', link: '/how-to/add-new-domain', activeMatch: '/how-to/' },
{ text: 'Explanation', link: '/explanation/architecture', activeMatch: '/explanation/' },
{ text: 'Reference', link: '/reference/configuration', activeMatch: '/reference/' },
{
text: 'v1.0.0',
items: [
Expand All @@ -17,29 +17,46 @@ function nav() {
]
}

function sidebar() {
function navJa() {
return [
{ text: 'チュートリアル', link: '/ja/tutorials/getting-started', activeMatch: '/ja/tutorials/' },
{ text: 'ハウツー', link: '/ja/how-to/add-new-domain', activeMatch: '/ja/how-to/' },
{ text: '解説', link: '/ja/explanation/architecture', activeMatch: '/ja/explanation/' },
{ text: 'リファレンス', link: '/ja/reference/configuration', activeMatch: '/ja/reference/' },
{
text: 'v1.0.0',
items: [
{ text: '変更履歴', link: 'https://github.com/hideyukiMORI/nene2-python/blob/main/CHANGELOG.md' },
{ text: 'リリース', link: 'https://github.com/hideyukiMORI/nene2-python/releases' },
{ text: 'PHP NENE2', link: 'https://hideyukimori.github.io/NENE2/' },
],
},
]
}

function sidebarEn() {
return {
'/tutorials/': [{
text: 'Tutorials',
items: [
{ text: 'Getting started', link: '/tutorials/getting-started' },
{ text: 'Getting started', link: '/tutorials/getting-started' },
{ text: 'Implement a new domain', link: '/tutorials/first-domain' },
],
}],
'/how-to/': [{
text: 'How-to guides',
items: [
{ text: 'Add a new domain', link: '/how-to/add-new-domain' },
{ text: 'Configure auth', link: '/how-to/configure-auth' },
{ text: 'Set up MCP', link: '/howto/mcp-setup' },
{ text: 'Run tests', link: '/how-to/run-tests' },
{ text: 'Add a new domain', link: '/how-to/add-new-domain' },
{ text: 'Configure auth', link: '/how-to/configure-auth' },
{ text: 'Set up MCP', link: '/howto/mcp-setup' },
{ text: 'Run tests', link: '/how-to/run-tests' },
],
}],
'/explanation/': [{
text: 'Explanation',
items: [
{ text: 'Architecture', link: '/explanation/architecture' },
{ text: 'Design philosophy', link: '/explanation/design-philosophy' },
{ text: 'Architecture', link: '/explanation/architecture' },
{ text: 'Design philosophy', link: '/explanation/design-philosophy' },
],
}, {
text: 'ADR',
Expand All @@ -58,9 +75,9 @@ function sidebar() {
'/reference/': [{
text: 'Reference',
items: [
{ text: 'Configuration', link: '/reference/configuration' },
{ text: 'Framework modules', link: '/reference/framework-modules' },
{ text: 'REST API', link: '/reference/api' },
{ text: 'Configuration', link: '/reference/configuration' },
{ text: 'Framework modules', link: '/reference/framework-modules' },
{ text: 'REST API', link: '/reference/api' },
],
}],
'/adr/': [{
Expand All @@ -79,6 +96,42 @@ function sidebar() {
}
}

function sidebarJa() {
return {
'/ja/tutorials/': [{
text: 'チュートリアル',
items: [
{ text: 'はじめての nene2-python', link: '/ja/tutorials/getting-started' },
{ text: '新しいドメインを実装する', link: '/ja/tutorials/first-domain' },
],
}],
'/ja/how-to/': [{
text: 'ハウツーガイド',
items: [
{ text: '新しいドメインを追加する', link: '/ja/how-to/add-new-domain' },
{ text: '認証を設定する', link: '/ja/how-to/configure-auth' },
{ text: 'MCP セットアップ', link: '/ja/howto/mcp-setup' },
{ text: 'テストを実行する', link: '/ja/how-to/run-tests' },
],
}],
'/ja/explanation/': [{
text: '解説',
items: [
{ text: 'アーキテクチャ概要', link: '/ja/explanation/architecture' },
{ text: '設計思想と PHP との対応', link: '/ja/explanation/design-philosophy' },
],
}],
'/ja/reference/': [{
text: 'リファレンス',
items: [
{ text: '設定リファレンス', link: '/ja/reference/configuration' },
{ text: 'フレームワークモジュール', link: '/ja/reference/framework-modules' },
{ text: 'REST API', link: '/ja/reference/api' },
],
}],
}
}

export default defineConfig({
title: 'NENE2 Python',
description: 'FastAPI + Clean Architecture + MCP. Python 3.12+. AI-ready from day one.',
Expand All @@ -93,27 +146,132 @@ export default defineConfig({
['link', { rel: 'icon', href: 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🐍</text></svg>' }],
],

locales: {
root: {
label: 'English',
lang: 'en',
themeConfig: {
nav: navEn(),
sidebar: sidebarEn(),
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'Edit this page on GitHub',
},
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
ja: {
label: '日本語',
lang: 'ja',
themeConfig: {
nav: navJa(),
sidebar: sidebarJa(),
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'GitHub でこのページを編集',
},
footer: {
message: 'MIT ライセンスの下でリリースされています。',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
fr: {
label: 'Français',
lang: 'fr',
themeConfig: {
nav: [
{ text: 'Tutoriel', link: '/fr/tutorials/getting-started' },
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
],
sidebar: {
'/fr/': [{ text: 'Tutoriels', items: [{ text: 'Premiers pas', link: '/fr/tutorials/getting-started' }] }],
},
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'Éditer cette page sur GitHub',
},
footer: {
message: 'Publié sous la licence MIT.',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
zh: {
label: '简体中文',
lang: 'zh-CN',
themeConfig: {
nav: [
{ text: '教程', link: '/zh/tutorials/getting-started' },
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
],
sidebar: {
'/zh/': [{ text: '教程', items: [{ text: '快速开始', link: '/zh/tutorials/getting-started' }] }],
},
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: '在 GitHub 上编辑此页面',
},
footer: {
message: '根据 MIT 许可证发布。',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
'pt-br': {
label: 'Português (Brasil)',
lang: 'pt-BR',
themeConfig: {
nav: [
{ text: 'Tutorial', link: '/pt-br/tutorials/getting-started' },
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
],
sidebar: {
'/pt-br/': [{ text: 'Tutoriais', items: [{ text: 'Primeiros passos', link: '/pt-br/tutorials/getting-started' }] }],
},
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'Editar esta página no GitHub',
},
footer: {
message: 'Lançado sob a Licença MIT.',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
de: {
label: 'Deutsch',
lang: 'de',
themeConfig: {
nav: [
{ text: 'Tutorial', link: '/de/tutorials/getting-started' },
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
],
sidebar: {
'/de/': [{ text: 'Tutorials', items: [{ text: 'Erste Schritte', link: '/de/tutorials/getting-started' }] }],
},
editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'Diese Seite auf GitHub bearbeiten',
},
footer: {
message: 'Veröffentlicht unter der MIT-Lizenz.',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},
},
},

themeConfig: {
siteTitle: '🐍 NENE2',
nav: nav(),
sidebar: sidebar(),

socialLinks: [
{ icon: 'github', link: 'https://github.com/hideyukiMORI/nene2-python' },
],

search: { provider: 'local' },
outline: { level: [2, 3] },

editLink: {
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
text: 'Edit this page on GitHub',
},

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2026 hideyukiMORI',
},
},

markdown: {
Expand Down
43 changes: 43 additions & 0 deletions docs/de/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
layout: home

hero:
name: "NENE2"
text: "Python API Framework"
tagline: FastAPI · Clean Architecture · MCP · mypy --strict · Von Anfang an KI-bereit.
actions:
- theme: brand
text: Loslegen →
link: /de/tutorials/getting-started
- theme: alt
text: Auf GitHub ansehen
link: https://github.com/hideyukiMORI/nene2-python
- theme: alt
text: PHP-Version
link: https://hideyukimori.github.io/NENE2/

features:
- icon: 🐍
title: Python 3.12+ nativ
details: Python 3.12 generische Syntax, eingefrorene Dataclasses und Pydantic v2. mypy --strict bei jedem Commit erzwungen.

- icon: ⚡
title: FastAPI + async
details: ASGI-nativ mit AsyncUseCaseProtocol für nicht blockierendes I/O. asyncio.gather für parallele Repository-Aufrufe.

- icon: 🤖
title: MCP integriert
details: UseCases werden über LocalMcpServer als MCP-Werkzeuge bereitgestellt — ohne zusätzliche Konfiguration.

- icon: 🏛️
title: Clean Architecture
details: HTTP Handler → UseCase → RepositoryInterface → SQLAlchemy. Jede Schicht mit InMemory-Repositories testbar.

- icon: 🛡️
title: Sicherheit zuerst
details: RFC 9457 Problem Details, Bearer + API Key Authentifizierung, Rate Limiting, Sicherheits-Header — sofort einsatzbereit.

- icon: 📄
title: OpenAPI automatisch generiert
details: Swagger UI und ReDoc unter /docs — keine Konfiguration. Statisches openapi.yaml mit einem Befehl exportieren.
---
54 changes: 54 additions & 0 deletions docs/de/tutorials/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Erste Schritte mit nene2-python

Dieses Tutorial ermöglicht es Ihnen, in 5 Minuten eine Notes-CRUD-API mit nene2-python zu starten.

## Voraussetzungen

- Python 3.12 oder höher
- [uv](https://docs.astral.sh/uv/) installiert
- Git

## 1. Repository klonen

```bash
git clone https://github.com/hideyukiMORI/nene2-python.git
cd nene2-python
```

## 2. Abhängigkeiten installieren

```bash
uv sync
```

## 3. Entwicklungsserver starten

```bash
uv run uvicorn src.example.app:app --reload --port 8080
```

Öffnen Sie `http://localhost:8080/docs` im Browser für die Swagger UI.

## 4. API testen

```bash
# Notiz erstellen
curl -X POST http://localhost:8080/notes \
-H "Content-Type: application/json" \
-d '{"title": "Meine erste Notiz", "body": "Erstellt mit nene2-python"}'

# Notizen auflisten
curl http://localhost:8080/notes
```

## 5. Tests ausführen

```bash
uv run pytest
```

Mehr als 135 Tests sollten erfolgreich sein.

## Nächste Schritte

- [Konfigurationsreferenz](../reference/configuration.md) — Datenbank und Authentifizierung über Umgebungsvariablen konfigurieren
Loading
Loading