Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
0386025
fix: Improve layout and add privacy policy link
ArturoAtomplay Mar 4, 2026
cb72ad9
feat(tracks): add track selection and progress tracking
Mar 4, 2026
68d5adb
docs(content): add basic Rust syntax and exercises
Mar 4, 2026
fbab653
docs(types): document scalar, compound types, and conversions
Mar 4, 2026
59f02a8
docs(control): explain control flow and pattern matching
Mar 4, 2026
fc04042
docs(ownership): describe ownership, moves, and drops
Mar 4, 2026
89de5d8
docs(borrowing): add references, slices, and borrowing patterns
Mar 4, 2026
93934b7
docs(structs): add struct usage, method impls, and practice
Mar 4, 2026
08cc404
docs(enums): introduce enums and advanced pattern matching
Mar 4, 2026
9a81edb
docs(content): add advanced topics and Rust roadmap
Mar 4, 2026
426b26b
docs(content): document Rust release channels
Mar 4, 2026
a3d88fe
docs(content): add environment setup instructions
Mar 4, 2026
66346ce
refactor(content): remove basic and advanced lesson markdown files
Mar 4, 2026
1a46de8
feat(editor): add test mode and display for code terminal output
Mar 4, 2026
a88e2da
feat(content): support test code and lesson meta parsing
Mar 4, 2026
ad13bc4
feat(sidebar): add hierarchical navigation and progress lock logic
Mar 4, 2026
09f5bab
feat(navbar): enable grouped lesson navigation and back link
Mar 4, 2026
d4af559
feat(home): update learn button to new overview path
Mar 4, 2026
678c3fb
refactor(editor): improve theme and editor layout handling
Mar 4, 2026
6d77a56
refactor(cookie): rename banner and overlay for privacy clarity
Mar 4, 2026
8f1fcf1
feat(lesson): redesign lesson page layout and tracking logic
Mar 4, 2026
3a2bb97
refactor(nav): simplify lesson nav button state handling
Mar 4, 2026
2177854
fix: format
Mar 4, 2026
69577ab
feat(content): :sparkles: Add new content
Mar 4, 2026
3bac569
docs(contributing): add Spanish and English contribution guides
Mar 4, 2026
8076f3f
build(deps): add qrcode and @types/qrcode dependencies
Mar 4, 2026
e006171
feat(assets): add Rust Lang ES SVG logo variants
Mar 4, 2026
7d7cf60
fix(sidebar): correct lesson slug extraction logic
Mar 4, 2026
c38a8ee
feat(content): restructure tracks and enable multi-language lessons
Mar 4, 2026
1dcde70
feat(certificates): add certificate modal and certificate page
Mar 4, 2026
0da84e9
feat(content): internationalize navigation and lesson URLs
Mar 4, 2026
587e362
feat(content): migrate lessons to language-prefixed routing
Mar 4, 2026
9cbc050
feat(content): update aprender page for track progress, i18n, and certs
Mar 4, 2026
f87e25e
feat(ui): enhance home, community, and playground sections
Mar 4, 2026
eda56e9
feat(config): add initial i18n config to Astro
Mar 4, 2026
58df176
chore(format): :art: Format code with prettier
Mar 4, 2026
3b86cb4
feat(progress): sync course completions with server
Mar 5, 2026
2b541fb
feat(auth-ui): add user session state to navbar and hero
Mar 5, 2026
d181cdf
feat(certificates): auto-claim and add social sharing
Mar 5, 2026
52c6c32
chore(config): update for Cloudflare deployment and D1 binding
Mar 5, 2026
ae746c1
build(deps): add Cloudflare and wrangler dependencies
Mar 5, 2026
9c42fe8
feat(db): add core database schema and migrations
Mar 5, 2026
402827a
feat(auth): implement authentication logic and session handling
Mar 5, 2026
1dc17c3
feat(progress): track and update user course progress
Mar 5, 2026
982fb55
feat(certificates): add certificate claiming and verification logic
Mar 5, 2026
23c409e
feat(ui): add login, profile, and 404 pages with user interactions
Mar 5, 2026
463c78d
feat(ui): Add 404 error image
Mar 5, 2026
1a67ed9
chore(format): Format code
Mar 5, 2026
fcd4717
docs(contributing): update installation steps and clarify dev modes
Mar 5, 2026
169e72c
docs(todos): add project TODOs and feature suggestions
Mar 5, 2026
ea08b84
chore(deps): add toastr, @types/toastr, and jquery dependencies
Mar 5, 2026
2549ad3
feat(editor): improve terminal mobile UX and fix output controls
Mar 5, 2026
efd9b25
feat(content): add toast on next button and improve accessibility
Mar 5, 2026
62577ff
chore(style): import toastr CSS and tweak toast appearance
Mar 5, 2026
b9d8d29
feat(auth): clear local progress on logout for data consistency
Mar 5, 2026
d63fa85
feat(lesson): add responsive mobile tab navigation for editor
Mar 5, 2026
af15055
style(tracks): improve course card layout and badge display
Mar 5, 2026
4f93e3e
fix(certificado): update Twitter handle for certificate sharing
Mar 5, 2026
7a6c711
feat(utils): add toast utility for unified notifications
Mar 5, 2026
c53c7e5
feat(profile): lock full name after first change
Mar 5, 2026
09bd8fe
feat(home): add new homepage sections and improve layout
Mar 5, 2026
a2219bd
style(markdown): replace alert emoji with SVG icons
Mar 5, 2026
78238e6
fix(ui): improve certificate and navigation iconography
Mar 5, 2026
4a7c797
refactor(i18n): standardize i18n formatting and more_below label
Mar 5, 2026
8fb2086
docs(todos): update completed tasks in TODO list
Mar 5, 2026
a34fb8c
build(deps): replace toastr with sweetalert2 and driver.js
Mar 5, 2026
07e38ad
feat(progress): track and sync last lesson per course
Mar 5, 2026
3297099
refactor(progress): simplify section progress schema and logic
Mar 5, 2026
e6ca836
feat(auth): add nanostores user state and profile sync
Mar 5, 2026
1f33677
feat(ui): add guided tour trigger and toast for course completion
Mar 5, 2026
b7911dc
feat(home): show login or profile in hero based on auth state
Mar 5, 2026
93e0853
style(home): remove redundant Spanish label from hero features
Mar 5, 2026
996cdbf
feat(nav): improve navbar user profile link and dynamic updates
Mar 5, 2026
10831a4
refactor(content): migrate toasts to sweetalert2 and update imports
Mar 5, 2026
d46b0b1
feat(content): ensure lesson visits are always tracked
Mar 5, 2026
276448c
feat(cert): redesign certificate UI and add badge mode
Mar 5, 2026
2bab909
fix(api): return full user profile and name lock state
Mar 5, 2026
87df437
fix(verify): use new certificate design in verification page
Mar 5, 2026
44232c7
refactor(content): remove obsolete TODOs and legacy file
Mar 5, 2026
b0cf893
refactor(auth): flatten user utils and store modules
Mar 5, 2026
c2efa7e
style(home): reformat arrays for consistency and readability
Mar 5, 2026
f4252d4
refactor(db): simplify DB function signatures and queries
Mar 5, 2026
ac7fe5b
style(api): reformat API route files for clarity
Mar 5, 2026
bde0111
style(ui): reformat toast, CSS, and utility for style consistency
Mar 5, 2026
eb0b4dd
Implement the cookie banner i18n spanish version
MarioYellowy Mar 6, 2026
139c329
feat(i18n): Add `EN` content
Mar 6, 2026
32c20a8
feat(i18n): add full multi-language routing and UI
Mar 6, 2026
96d398a
refactor(i18n): use language context in core site components
Mar 6, 2026
a538619
feat(middleware): detect and inject language from request
Mar 6, 2026
ba3f906
refactor(i18n): centralize language state in layout and context
Mar 6, 2026
d492e20
refactor(content): support multiple languages in content manager
Mar 6, 2026
4dcbb02
fix(auth): redirect and error handling for multi-language login
Mar 6, 2026
9d10092
refactor(routing): default root to preferred language landing page
Mar 6, 2026
6518126
refactor(content): remove legacy static privacy policy page
Mar 6, 2026
533f0dd
refactor(i18n): reorder imports for consistency
Mar 6, 2026
dc6e284
refactor(content): remove semicolons and use tabs
Mar 6, 2026
88876f0
refactor(auth): remove semicolons and use tab indentation
Mar 6, 2026
2cb6b41
refactor(routes): simplify static path functions
Mar 6, 2026
bae46da
feat(i18n): add translation keys and dynamic track/lesson titles
Mar 9, 2026
b960aba
feat(navbar): unify and internationalize navigation bar
Mar 9, 2026
d42f50e
feat(auth): support username editing and robust profile update
Mar 9, 2026
3051063
fix(auth): preserve language in GitHub OAuth flow
Mar 9, 2026
5948fd9
refactor(sidebar): internationalize sidebar and cleanup visited UI
Mar 9, 2026
54e4561
feat(hero): add dynamic user state and translation to hero bar
Mar 9, 2026
e0ed5eb
refactor(login): clean up login page layout and GitHub OAuth URL
Mar 9, 2026
5ee78cd
refactor(config): add i18n routing config to Astro
Mar 9, 2026
49a836d
refactor(auth): improve session cookie logic for env awareness
Mar 9, 2026
92ae1bb
refactor(auth): move user and lesson access checks to page
Mar 9, 2026
0a1ac59
ci(pipeline): add GitHub secrets to deploy workflow
Mar 9, 2026
edc619a
ci(pipeline): update preview workflow to use correct env var
Mar 9, 2026
d82beb7
refactor(auth): rename GitHub env vars for consistency
Mar 9, 2026
ca10bd1
refactor(auth): remove unused static paths and scripts from login
Mar 9, 2026
090f89f
chore(db): update D1 database ID in config
Mar 9, 2026
58cc9f2
style(i18n): reformat translation key files for clarity
Mar 9, 2026
0e3d13d
style(auth): apply consistent formatting to session logic
Mar 9, 2026
45f84e4
style(auth): reformat GitHub OAuth callback for consistency
Mar 9, 2026
a03e49e
style(auth): improve PATCH profile endpoint formatting
Mar 9, 2026
a00df9e
style(components): reorder and align import statements
Mar 9, 2026
4859ff4
style(components): condense boolean and function expressions
Mar 9, 2026
f12f819
refactor(certificates): remove name input and streamline data flow
Mar 9, 2026
b41f5b6
fix(certificates): ensure correct track title in message replacement
Mar 9, 2026
515e537
fix(certificates): Update Certificates views
Mar 9, 2026
6a3682a
Merge branch 'main' into develop
Mar 9, 2026
3aa63b8
Update .github/workflows/pr-preview.yml
Wilovy09 Mar 9, 2026
7c43828
chore(ci): Update wrangler version
Mar 9, 2026
e380931
chore(docs): Update README
Mar 9, 2026
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
1 change: 1 addition & 0 deletions .assetsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_worker.js
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,23 @@ jobs:
VITE_CLARITY_PROJECT_ID: ${{ secrets.VITE_CLARITY_PROJECT_ID }}
run: npm run build

- name: Ignore _worker.js in assets
run: echo "_worker.js" > dist/.assetsignore

- name: Deploy
uses: cloudflare/wrangler-action@v3
env:
VITE_CLARITY_PROJECT_ID: ${{ secrets.VITE_CLARITY_PROJECT_ID }}
GH_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }}
GH_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}
with:
wranglerVersion: "4.19.1"
wranglerVersion: "4.45.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy
secrets: |
VITE_CLARITY_PROJECT_ID
GH_CLIENT_ID
GH_CLIENT_SECRET
SESSION_SECRET
18 changes: 15 additions & 3 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ jobs:
run: npm install
- name: Build
env:
NUXT_CLARITY_ID: ${{ secrets.CLARITY_ID }}
run: npm run build --preset=cloudflare_pages
VITE_CLARITY_PROJECT_ID: ${{ secrets.VITE_CLARITY_PROJECT_ID }}
run: npm run build

- name: Ignore _worker.js in assets
run: echo "_worker.js" > dist/.assetsignore

# Deploy steps
- name: Normalize alias
Expand All @@ -89,7 +92,16 @@ jobs:
wranglerVersion: "4.45.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: versions upload --name "${{ env.PROJECT_NAME }}" --preview-alias "${{ env.ALIAS }}"
secrets: |
VITE_CLARITY_PROJECT_ID
GH_CLIENT_ID
GH_CLIENT_SECRET
SESSION_SECRET
env:
VITE_CLARITY_PROJECT_ID: ${{ secrets.VITE_CLARITY_PROJECT_ID }}
GH_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }}
GH_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}

- name: Extract hash from CF url Deploy
run: |
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ pnpm-debug.log*
# environment variables
.env
.env.production
.dev.vars

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
bun.lock
pnpm-lock.yaml
pnpm-lock.yaml

# wrangler
.wrangler/
187 changes: 187 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# Guia de contribucion

Gracias por querer contribuir a Rustlings Web. Este documento explica como participar en el proyecto, ya sea mejorando el codigo, corrigiendo errores o traduciendo el contenido.

---

## Flujo de trabajo general

Este proyecto sigue un flujo basado en ramas:

- `main` — rama de produccion. Solo recibe merges desde `develop`.
- `develop` — rama de integracion. Todas las pull requests van aqui.

### Pasos para contribuir

1. Haz un fork del repositorio en GitHub.
2. Clona tu fork localmente:
```
git clone https://github.com/RustLangES/rustlings-web.git
cd rustlings-web
```
3. Crea una rama descriptiva desde `develop`:
```
git checkout develop
git checkout -b feat/nombre-de-tu-cambio
```
4. Realiza tus cambios y haz commits con mensajes claros.
5. Sube tu rama a tu fork:
```
git push origin feat/nombre-de-tu-cambio
```
6. Abre una pull request hacia la rama `develop` del repositorio original.
7. Un mantenedor revisara tu PR. Una vez aprobado, se hara merge a `develop` y, en el siguiente ciclo de release, a `main`.

### Convenciones de nombrado de ramas

| Tipo | Prefijo | Ejemplo |
|---------------|-------------|---------------------------------|
| Nueva funcion | `feat/` | `feat/agregar-progreso-usuario` |
| Correccion | `fix/` | `fix/nav-buttons-href` |
| Contenido | `content/` | `content/traduccion-en` |
| Documentacion | `docs/` | `docs/actualizar-readme` |
| Refactor | `refactor/` | `refactor/content-manager` |

---

## Contribuir con traducciones de contenido

El contenido del curso esta organizado por idioma dentro de `src/content/`:

```
src/content/
fundamentos-de-rust/
es/ <- Espanol (existente)
en/ <- Ingles (puedes crearlo)
[lang]/ <- Cualquier otro idioma futuro
```

### Agregar un nuevo idioma

1. Crea la carpeta del idioma dentro del track correspondiente:
```
src/content/fundamentos-de-rust/[codigo-idioma]/
```
Usa codigos de idioma estandar BCP 47: `en`, `pt`, `fr`, `de`, etc.

2. Traduce los archivos `.md` del directorio `es/` y colocalos en la nueva carpeta manteniendo los mismos nombres de archivo.

3. Registra el nuevo idioma en los siguientes tres archivos:

**`src/content-manager.ts`**
```ts
export const supportedLangs = ["es", "en"] as const // agrega tu idioma
```

**`astro.config.mjs`**
```js
i18n: {
defaultLocale: "es",
locales: ["es", "en"], // agrega tu idioma
}
```

**`src/i18n/ui.ts`**
```ts
export const languages = {
es: "Espanol",
en: "English", // agrega tu idioma
}

export const ui = {
es: { ... },
en: {
"nav.home": "Home",
"nav.learn": "Learn",
// ... resto de las claves
},
}
```

4. Abre una pull request hacia `develop` con el prefijo `content/` en el nombre de la rama.

### Estructura de los archivos de contenido

Cada archivo `.md` sigue la convencion `[id].[slug].md`:

```
1.introduccion-rust.md
2.sintaxis-esencial.md
2-1.variables-mutabilidad.md
2-2.tipos-primitivos.md
```

El numero antes del punto define el orden en el indice. Los archivos con un guion (`2-1`, `2-2`) son subsecciones del capitulo principal (`2`).

El frontmatter admite las siguientes propiedades:

```yaml
---
editor: true # muestra el editor de codigo (true/false)
code: | # codigo inicial en el editor (opcional)
fn main() {}
expectedOutput: "" # salida esperada para validar el ejercicio (opcional)
testCode: "" # codigo de prueba adicional (opcional)
---
```

### Corregir contenido existente

Si encuentras un error en el contenido en espanol u otro idioma, puedes abrir una PR directamente editando el archivo `.md` correspondiente en `src/content/fundamentos-de-rust/[lang]/`.

---

## Instalacion y desarrollo local

### 1. Instalar dependencias

```
npm install
```

### 2. Instalar Wrangler (CLI de Cloudflare)

```
npm install -g wrangler
```

### 3. Configurar base de datos

1. Crea una base de datos D1 en Cloudflare:
```
wrangler d1 create rustlings
```

2. Actualiza `wrangler.toml` con tu `database_id` y `database_name`:
```toml
[[d1_databases]]
binding = "DB"
database_name = "tu-nombre-de-db"
database_id = "tu-database-id"
```

3. Ejecuta las migraciones:
```
wrangler d1 migrations apply --local
```

### 4. Desarrollo

Para desarrollo basico (sin funcionalidades de backend):
```
npm run dev
```

Para desarrollo completo con todas las funcionalidades:
```
npm run build
wrangler dev
```

El servidor de desarrollo estara disponible en `http://localhost:8787` con Wrangler o `http://localhost:4321` con Astro.

---

## Preguntas

Si tienes dudas sobre como contribuir, abre un issue en el repositorio o consulta en el servidor de Discord del proyecto.
Loading
Loading