Skip to content

Commit 999b32f

Browse files
committed
made sure every nav points to file, edited a lot of content to map www/docs and this docs repo
1 parent 2a48ed2 commit 999b32f

81 files changed

Lines changed: 3287 additions & 881 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.

build_all.py

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
55
This script builds the documentation for all configured languages
66
(English, Spanish, Portuguese, and Brazilian Portuguese).
7+
8+
Before building, runs scripts/verify_docs_nav.py (every .md is listed in nav).
9+
After a successful build, runs scripts/verify_docs_rendered.py (every .md has HTML output).
710
"""
811

912
import subprocess
1013
import sys
1114
from pathlib import Path
1215

1316
ROOT = Path(__file__).parent
17+
VERIFY_NAV = ROOT / "scripts" / "verify_docs_nav.py"
18+
VERIFY_RENDERED = ROOT / "scripts" / "verify_docs_rendered.py"
1419
CONFIG_FILES = [
1520
"zensical.toml", # English
1621
"zensical.es.toml", # Spanish
@@ -49,7 +54,20 @@ def run_command(cmd, description):
4954
def main():
5055
print("🌍 Building omegaUp Documentation - All Languages")
5156
print(f"📂 Working directory: {ROOT}")
52-
57+
58+
if not VERIFY_NAV.is_file():
59+
print(f"❌ Missing {VERIFY_NAV.name}; cannot verify navigation coverage.")
60+
return 1
61+
if not run_command(
62+
[PYTHON, str(VERIFY_NAV)],
63+
"Verifying nav covers every markdown page (all locales)",
64+
):
65+
print(
66+
"\nFix orphan pages in zensical*.toml, then rebuild. "
67+
"See scripts/verify_docs_nav.py for rules."
68+
)
69+
return 1
70+
5371
# Clean the site directory first
5472
print("\n🧹 Cleaning site directory...")
5573
site_dir = ROOT / "site"
@@ -105,25 +123,38 @@ def main():
105123
index_file = ROOT / "site" / "index.html"
106124
index_file.write_text(redirect_html, encoding="utf-8")
107125
print(" Created site/index.html redirect")
108-
126+
109127
# Summary
110128
print("\n" + "="*60)
111129
if failures:
112-
print(f"⚠️ Build completed with errors")
130+
print("⚠️ Build completed with errors")
113131
print(f" Failed languages: {', '.join(failures)}")
114132
return 1
115-
else:
116-
print("✅ All language versions built successfully!")
117-
print("\n📚 Available languages:")
118-
print(" • English: site/en/")
119-
print(" • Español: site/es/")
120-
print(" • Português: site/pt/")
121-
print(" • Português (Brasil): site/pt-BR/")
122-
print("\n🚀 To serve locally, run:")
123-
print(" python3 serve_multilang.py")
124-
print(" or")
125-
print(" cd site && python3 -m http.server 8000")
126-
return 0
133+
134+
if not VERIFY_RENDERED.is_file():
135+
print(f"❌ Missing {VERIFY_RENDERED.name}; cannot verify rendered HTML.")
136+
return 1
137+
if not run_command(
138+
[PYTHON, str(VERIFY_RENDERED)],
139+
"Verifying every markdown page produced HTML (all locales)",
140+
):
141+
print(
142+
"\nSome source pages are missing from site/. "
143+
"See scripts/verify_docs_rendered.py."
144+
)
145+
return 1
146+
147+
print("✅ All language versions built successfully!")
148+
print("\n📚 Available languages:")
149+
print(" • English: site/en/")
150+
print(" • Español: site/es/")
151+
print(" • Português: site/pt/")
152+
print(" • Português (Brasil): site/pt-BR/")
153+
print("\n🚀 To serve locally, run:")
154+
print(" python3 serve_multilang.py")
155+
print(" or")
156+
print(" cd site && python3 -m http.server 8000")
157+
return 0
127158

128159
if __name__ == "__main__":
129160
try:

docs/en/api/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ Error responses:
114114
}
115115
```
116116

117+
## Complete endpoint catalog
118+
119+
This site documents the main API **categories** in detail. The wiki used to duplicate a very long flat list of every `/api/...` path; the **generated, authoritative index** of controllers and routes lives in the main repository:
120+
121+
**[frontend/server/src/Controllers/README.md](https://github.com/omegaup/omegaup/blob/main/frontend/server/src/Controllers/README.md)**
122+
123+
Routing convention: a request to `/api/<segment>/<action>/` is handled by `<Segment>Controller::api<Action>` in `frontend/server/src/Controllers/` (with the usual PHP naming adjustments). Use the generated README for exact method names and parameters while developing.
124+
117125
## Rate Limiting
118126

119127
Some endpoints have rate limits to prevent abuse:

docs/en/api/rest-api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Returns the current UNIX timestamp according to the server's internal clock. Use
9191

9292
**Required Permissions:** None
9393

94+
## Complete endpoint catalog
95+
96+
For an **exhaustive** list of API methods grouped by controller, see the auto-generated **[Controllers README](https://github.com/omegaup/omegaup/blob/main/frontend/server/src/Controllers/README.md)** in the omegaUp repository. The human-written pages here (`users.md`, `contests.md`, …) focus on the most common flows; the README is the best reference when you need a specific `apiSomething` name.
97+
9498
## Rate Limiting
9599

96100
Some endpoints have rate limits:

docs/en/architecture/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ flowchart TD
119119
When a user submits code, here's what happens:
120120

121121
1. **Frontend** sends HTTP POST to `/api/run/create/`
122-
2. **Nginx** forwards request to PHP (HHVM)
122+
2. **Nginx** forwards the request to **PHP** (PHP-FPM in typical setups)
123123
3. **Bootstrap** loads configuration and initializes database
124124
4. **Controller** (`RunController::apiCreate`) processes request
125125
5. **Authentication** validates user token

docs/en/architecture/internals.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sequenceDiagram
3939
When a submission is made:
4040

4141
1. Code, contest alias, problem, and language sent via HTTP POST to `/api/run/create/`
42-
2. Nginx forwards to PHP (HHVM)
42+
2. Nginx forwards the request to **PHP** (PHP-FPM in typical deployments; the entrypoint loads `frontend/server/bootstrap.php`)
4343
3. `bootstrap.php` loads configuration and initializes database
4444
4. `Request` object created with parameters
4545
5. URL tokenized: `/api/run/create/``['run', 'create']`
@@ -57,6 +57,7 @@ The controller:
5757
- Contest time limit not expired
5858
- Submission rate limit (60 seconds per problem)
5959
- Contest visibility (public or user listed)
60+
- **Lockdown mode** (when enabled): extra checks apply—for example, blocking submissions that would count as **practice mode** when the platform is locked down for a contest window
6061
4. Calculates penalty based on contest policy
6162
5. Generates random GUID
6263
6. Stores submission in database

docs/en/architecture/security.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Third-party authentication via:
115115

116116
- **Google**: OAuth 2.0 with ID token verification
117117
- **Facebook**: OAuth 2.0 with access token
118+
- **GitHub** (optional in production; common in **local dev**): configure `OMEGAUP_GITHUB_CLIENT_ID` / `OMEGAUP_GITHUB_CLIENT_SECRET` in `frontend/server/config.php` — see the **GitHub OAuth** section in [Development setup](../../getting-started/development-setup.md)
118119

119120
```mermaid
120121
sequenceDiagram

0 commit comments

Comments
 (0)