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
11 changes: 11 additions & 0 deletions .agent/logs/refactor-journal.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@
- Abstraction & Reusability: Extracted generic local storage logic into a reusable hook that guarantees type safety and handles parsing / error states centrally.
- SRP (Single Responsibility Principle): The UI component `WorldMap` no longer owns the responsibility of safely interacting with the browser's `localStorage` API.
- **🔬 Verification:** `tsc`, `npm test`, `npm run lint`, and `npm run build` all passed successfully.
## 2025-03-05 — Refactoring `coreLogic.ts` into Single Responsibility files

- **💡 What:** Split `src/utils/gamification/coreLogic.ts` (400 lines) into `src/utils/gamification/initialState.ts` and `src/utils/gamification/questionLogic.ts`.
- **🎯 Why:** Code smell identified: `coreLogic.ts` violated SRP by handling basic gamification object initialization/parsing as well as complex logic rules like processing completed questions.
- **📁 Files Changed:**
- `src/utils/gamification/coreLogic.ts` (deleted)
- `src/utils/gamification/initialState.ts` (created)
- `src/utils/gamification/questionLogic.ts` (created)
- `src/utils/gamificationState.ts` (updated exports)
- **🧹 Architectural Gain:** Applied SRP (Single Responsibility Principle). Initial state setup and deep complex rules are now strictly separated by domain concerns.
- **🔬 Verification:** Confirmed that `tsc`, `npm test`, `npm run lint`, and `npm run build` all pass successfully.
32 changes: 16 additions & 16 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,97 +2,97 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://pyexplorer.com.br</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/login</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/register</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/python-para-criancas</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/aprender-python-jogando</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/about</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/o-que-e-python</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/por-que-aprender-python</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/python-para-criancas</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/como-ensinar-python-criancas</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/primeiros-passos-python</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/jogos-aprender-programacao</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/exercicios-python-criancas</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/scratch-vs-python</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://pyexplorer.com.br/learn/projetos-python-criancas</loc>
<lastmod>2026-10-03</lastmod>
<lastmod>2026-10-05</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
Expand Down
Loading
Loading