@academy-sdk/starter
v1.0.1
Published
Starter kit for building custom Academy learner templates
Downloads
109
Readme
@academy-sdk/starter
A minimal starter template for building custom Academy learner templates with the @academy-sdk/sdk.
Installation
npm install @academy-sdk/starterOr clone and customize:
git clone <repo-url>
cd template-starter
npm installUsage
As an npm dependency
import template from '@academy-sdk/starter';
// Register the template with the Academy platform
registerTemplate(template);As a standalone template
- Edit
src/manifest.jsonwith your template name - Customize pages in
src/pages/(copy from SDK defaults as starting point) - Update
src/index.tsxto register your custom pages - Build and package:
npm run build # Compile to dist/bundle.js
npm run zip # Create deployable .zip package
npm run preview # Local preview at http://localhost:3000
npm run dev # Watch mode for development- Upload the
.zipfile in Academy Creator Dashboard → Settings → Learner Template
What's Included
This is a minimal starter — it customizes only a few pages and uses SDK defaults for the rest:
| Page | Source |
|---|---|
| Course Detail | Custom (src/pages/CourseDetailPage.tsx) |
| Course Player | Custom (src/pages/CoursePlayerPage.tsx) |
| All other pages | SDK defaults |
Custom Components
- CustomSidebar — Navigation sidebar
- CustomNavbar — Top navigation bar
- DefaultLayout — Layout wrapper
Customizing a Page
- Copy the SDK default page or start from the examples in
src/pages/ - Modify the JSX — change layout, colors, components
- Import your page in
src/index.tsx:
import { CustomMyLearningPage } from './pages/MyLearningPage';
const template: TemplateManifest = {
...defaults,
pages: {
...defaults.pages,
MyLearningPage: CustomMyLearningPage,
},
};How It Works
- All data comes through props — no API calls needed
- Use
@academy-sdk/sdkcomponents as building blocks, or build from scratch - Only customize the view layer — the platform handles routing, data, and logic
Available SDK Components
| Category | Components | |---|---| | Atoms | Button, Input, Card, Badge, Avatar, ProgressBar, Tabs | | Molecules | CourseCard, Pagination, PageHeader, SearchInput, EmptyState, LoadingSpinner | | Organisms | LearnerNavbar, LearnerSidebar, CourseSidebar, LessonNotes, LessonBookmarks | | Pages | MyLearningPage, CatalogCoursesPage, CourseDetailPage, CoursePlayerPage, MessagesPage, ... |
Preview Mode
Preview locally with mock data:
npm run preview # starts at http://localhost:3000
PORT=4000 npm run preview # custom portThe preview toolbar lets you switch between all pages. Edit preview/mock-data.ts to customize test data.
Files in preview/ are never included in the production bundle.
License
MIT
