Skip to content

Repository files navigation

Mantik

Web-based programming and robotics learning platform for FIRST Robotics teams (Java, FTC, FRC, competitive coding).

Built with Astro 5 + MDX + TypeScript, deployed as a static site on Netlify.

Quick Start

npm install
npm run dev

Open http://localhost:5173

Search in dev: Pagefind indexes are created at build time. Run npm run build once (or use npm run dev:search), then restart npm run dev so /pagefind/* assets are available locally.

Build & Preview

npm run build    # Astro build + Pagefind search index
npm run preview  # Preview production build locally

Project Structure

src/
├── content/          # MDX lessons (java, ftc, frc, comp, homepage)
├── components/       # Layout + MDX block components
├── layouts/          # BaseLayout, LessonLayout
├── pages/            # Astro routes
└── styles/global.css # SWYFT design system

public/
├── admin/            # Decap CMS
└── media/            # Static assets

legacy/               # Pre-Astro JSON SPA (archived)
scripts/                # migrate-json-to-mdx.mjs

Adding or Editing Content

Option 1: Decap CMS (visual editor)

  1. Deploy the site to Netlify and enable Netlify Identity + Git Gateway
  2. Visit /admin on your deployed site
  3. Edit lessons in the visual editor — changes commit to Git as MDX

Option 2: Edit MDX directly

Lesson files live in src/content/{section}/. Each file has frontmatter and a readable MDX body — no component imports needed.

See docs/content-authoring.md for the full guide.

---
title: Branching and Merging
lessonId: branching-merging
section: java
group: version-control
groupLabel: "Version Control with Git & GitHub"
groupOrder: 5
order: 4
difficulty: intermediate
duration: 35 min
---

### Working with Branches

Plain markdown paragraphs and lists work as expected.

```java
git branch feature-name
git checkout -b new-branch
  • Use feature branches for isolated work
  • Keep main competition-ready
  1. Create a branch
  2. Merge it back to main
```

MDX Block Components

Registered in src/mdx-components.ts — use directly in lesson MDX without imports. Prefer markdown + fenced code over legacy prop-only usage.

Component Purpose
RulesBox Highlighted rules, tips, good practices (markdown slot)
StepsBox Numbered steps
ExerciseBox Practice tasks with optional answers
LinkGrid Navigation link cards
CodeBlock Legacy single code wrapper; prefer fenced code
CodeTabs / CodeTab Tabbed code (Talon FX / SPARK MAX, etc.); use fenced code inside CodeTab slots
TextBlock Legacy HTML strings only when markdown is not enough
ContentTable Data tables
DataTypesGrid Data type comparison cards
LogicalOperators Operator reference

Migrating from Legacy JSON

The original JSON content is archived in legacy/data/. To re-run migration:

npm run migrate

Warning: This regenerates all of src/content/ from JSON and overwrites hand-edited MDX. Commit or back up first. See docs/content-authoring.md.

Deployment

Configured for Netlify via netlify.toml:

  • Build: npm run build
  • Publish: dist/
  • Sitemap: auto-generated by @astrojs/sitemap
  • Search: Pagefind (built at deploy time)

License

Copyright © 2026 Mantik

About

Comprehensive Java learning platform for robotics teams and programming enthusiasts. Interactive web-based training covering Java fundamentals, FTC/FRC robotics programming, and competitive coding.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages