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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MAILGUN_API_KEY=
MAILGUN_DOMAIN=
MAILGUN_API_URL=https://api.mailgun.net/v3
MAILGUN_FROM_EMAIL=
MAILGUN_TO_EMAIL=
NEXT_PUBLIC_SITE_URL=
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["next/core-web-vitals"],
"rules": {
"@next/next/no-html-link-for-pages": "off"
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.next/
dist/
*.log
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,49 @@
# Open-BeatBox.github.io
# Beatbox – Content-Driven Next.js Site

A Next.js 15 App Router site for **Beatbox**, an open, modular home-cage cognitive monitoring system. All copy and structure come from Markdown in `content/` and render through reusable React components.

## Content model
- Site metadata: `content/_site.md` (title, description, keywords, authors, Open Graph/Twitter defaults, logo paths).
- Pages: top-level Markdown files like `content/home.md`, `content/beatbox.md`. Each has frontmatter with `hero`, `sections`, `layout`, `slug`, and navigation fields.
- Blog: Markdown in `content/blog/*.md` with `layout: "blog"`, `publishAt` for scheduling, and optional `showInNav`/`navOrder`.
- Navigation: built automatically from `showInNav` and `navOrder`.
- Metadata: generated from `_site.md` plus per-page overrides, with canonical URLs built from `NEXT_PUBLIC_SITE_URL`.

## Getting started
```bash
npm install
npm run dev
```

## Scripts
- `npm run dev` – start development server
- `npm run build` – production build
- `npm run start` – start production server
- `npm run lint` – ESLint (Next.js config, ESLint 9)
- `npm run type-check` – TypeScript `--noEmit`
- `npm run test` – lightweight utility tests via `ts-node`

## Adding content
1. Duplicate an existing file in `content/` and adjust frontmatter (`title`, `layout`, `slug`, `hero`, `sections`).
2. For blog posts, place files in `content/blog/` with `layout: "blog"` and `publishAt`. Future-dated posts are hidden until their date.
3. Navigation updates automatically from `showInNav` and `navOrder`.

## Metadata & SEO
- Global defaults come from `content/_site.md`.
- Per-page metadata uses hero/subtitle or body for descriptions and pulls OG/Twitter images from hero backgrounds, the first Markdown image, or the default logo/OG image.
- `NEXT_PUBLIC_SITE_URL` is used for canonical, sitemap, and robots entries.

## Environment variables
Copy `.env.example` to `.env.local` and fill in:
- `MAILGUN_API_KEY`, `MAILGUN_DOMAIN`, `MAILGUN_API_URL`, `MAILGUN_FROM_EMAIL`, `MAILGUN_TO_EMAIL`
- `NEXT_PUBLIC_SITE_URL`
- `NEXT_PUBLIC_RECAPTCHA_SITE_KEY` (optional Google reCAPTCHA for the contact form)

## Contact form
`/api/send-email` accepts JSON `fields`, sanitizes values, and forwards them to Mailgun. Ensure the Mailgun variables are set and reachable from the server environment.

## Styling
Tailwind CSS v4 via `@tailwindcss/postcss`, plus small component-scoped CSS files (e.g., `HeroSection.css`, `ContentSections.css`) to keep the glass aesthetic and hero typography.

## Testing
`npm run test` executes simple utility checks via `ts-node`. Extend with additional utility or content schema tests as needed.
23 changes: 23 additions & 0 deletions content/_site.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Beatbox – Open Home-Cage Cognitive Monitoring for Mice"
description: "Beatbox is an open, modular home-cage cognitive monitoring system for mice. Measure continuously, stream in real time, and standardize behavioral experiments across labs."
keywords:
- Beatbox
- home-cage monitoring
- operant conditioning
- behavioral neuroscience
- open hardware
authors:
- name: "Beatbox Contributors"
url: "https://github.com/beatbox-hcm"
openGraph:
defaultImage: "/images/beatbox-og-default.png"
type: "website"
locale: "en_US"
twitter:
handle: "@beatbox_hcm"
cardType: "summary_large_image"
logo: "/images/beatbox-logo.svg"
brandColor: "#2563EB"
secondaryColor: "#0F172A"
---
56 changes: 56 additions & 0 deletions content/beatbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: "What is Beatbox?"
layout: "page"
showInNav: true
navOrder: 2
slug: "/beatbox"
hero:
title: "Ecological, automated operant-conditioning in the home cage."
subtitle: "Continuous behavioral experiments with reduced handling, improved welfare, and richer data."
sections:
- type: "text"
title: "Beatbox in a nutshell"
body: |
Beatbox is an ecological, automated operant-conditioning and home-cage monitoring device for mice. It enables continuous (24/7) behavioral experiments directly in the animal’s living environment.

By allowing mice to self-engage in tasks at any time over weeks, Beatbox both refines welfare conditions and improves the statistical power of experiments.
- type: "list"
title: "Core problems Beatbox addresses"
items:
- "Short, stressful, experimenter-dependent sessions"
- "Limited task flexibility in classical operant chambers"
- "Poor standardization across labs and platforms"
- type: "pipeline"
title: "Design overview"
steps:
- "Environmental sensors (temperature, humidity, light)"
- "Behavioral sensors (IR beam breaks, nosepoke sensors, levers, capacitive touch)"
- "Audio input/output modules"
- "Microcontroller with real-time firmware"
- "Streaming to local PC or server via USB or Wi-Fi"
- "Python client and REST/WebSocket APIs for data access"
- type: "columns"
title: "Hardware and Software"
columns:
- heading: "Hardware design"
body: |
Beatbox uses a modular enclosure with removable panels so labs can adapt the chamber to their task.

Core components include the main chamber, interchangeable operant modules (nosepoke, rewards, sensors), a PCB with multiple sensor interfaces, and a central microcontroller.

<!-- TODO: Insert exact microcontroller model, chamber dimensions, reward system details, and power supply specs. -->
- heading: "Software stack"
body: |
The Beatbox software stack includes real-time acquisition firmware, a Python middleware layer for streaming and buffering, Dockerized services for visualization and storage, and open APIs in JSON and WebSocket formats.

Optional JSON-LD metadata export supports integration with FAIR data workflows.
- type: "roadmap"
title: "Versions & roadmap"
items:
- label: "v0.1 – First public release"
- label: "v0.2 – Modular panel redesign"
- label: "v0.3 – API stabilization"
- label: "v0.4 – Benchmarking and validation datasets"
- label: "v1.0 – Community hardware certification program"
---

13 changes: 13 additions & 0 deletions content/blog/first-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Introducing Beatbox: Open, Modular Home-Cage Cognitive Monitoring"
layout: "blog"
showInNav: false
publishAt: "2025-01-01T00:00:00.000Z"
navGroup: "Blog"
---

Beatbox is an open, modular home-cage cognitive monitoring system for mice. It is designed to enable continuous, ecological behavioral experiments while improving welfare and standardization.

In this first post, we summarize the motivation behind Beatbox, its core design principles, and how you can start exploring the hardware, firmware, and software stack.

Future posts will cover build tutorials, validation datasets, and integrations with other home-cage monitoring systems.
40 changes: 40 additions & 0 deletions content/build-and-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "Build & Code"
layout: "page"
showInNav: true
navOrder: 4
slug: "/build-and-code"
hero:
title: "Build Beatbox, flash the firmware, start streaming data."
subtitle: "Open hardware, open firmware, and open APIs."
sections:
- type: "steps"
title: "Hardware"
steps:
- "Download CAD, STL, PCB, and wiring diagrams from the Beatbox repository."
- "Order components using the Bill of Materials."
- "Assemble the chamber and modules following the build guide."
- "<!-- TODO: link exact GitHub repo and hardware docs. -->"
- type: "steps"
title: "Firmware"
steps:
- "Install the toolchain for the chosen microcontroller."
- "Clone the firmware repository."
- "Configure the build for your hardware variant."
- "Flash the firmware onto the Beatbox controller."
- "<!-- TODO: add exact commands and microcontroller type. -->"
- type: "steps"
title: "Software & API"
steps:
- "Install the Python client package and/or Docker stack."
- "Start the Beatbox server and confirm streaming from the device."
- "Use the REST or WebSocket API to subscribe to events and time-series."
- "Explore the example Jupyter notebooks for analysis workflows."
- type: "text"
title: "Contributing"
body: |
Contributions are welcome. Please follow the coding style and pull request process described in the repository.

<!-- TODO: link CONTRIBUTING.md and issue tracker. -->
---

47 changes: 47 additions & 0 deletions content/community.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "Community"
layout: "page"
showInNav: true
navOrder: 6
slug: "/community"
hero:
title: "Build, share, and refine Beatbox together."
subtitle: "A community-driven ecosystem for open behavioral neuroscience tools."
sections:
- type: "text"
title: "Who uses Beatbox?"
body: |
Beatbox is designed for behavioral neuroscience labs, preclinical platforms, and facilities interested in open, ecological monitoring and operant tasks in the home cage.

<!-- TODO: add a map or list of early adopters when available. -->
- type: "links"
title: "Join the community"
links:
- label: "GitHub repository and Discussions"
href: "#"
- label: "Chat server (Discord/Slack/Zulip)"
href: "#"
note: "<!-- TODO: insert actual invite link and chosen platform. -->"
- type: "faq"
title: "FAQ"
items:
- question: "What sensors does Beatbox support?"
answer: "Beatbox supports environmental sensors (temperature, humidity, light) and behavioral sensors such as IR beam breaks, nosepoke sensors, and capacitive touch modules. Exact sensor models can be configured per build."
- question: "Can Beatbox integrate with video-based HCM systems?"
answer: "Yes. Beatbox is designed to complement camera-based systems and can be synchronized via software and, where available, hardware triggers."
- question: "What are the power and network requirements?"
answer: "Typical setups require a stable power source and either USB or Wi-Fi for data transfer. Detailed requirements depend on the final hardware configuration."
- type: "text"
title: "How to cite Beatbox"
body: |
If you use Beatbox in a scientific publication, please cite the Beatbox project and its main reference paper once available.

<!-- TODO: add canonical citation (plain text + BibTeX) once a preprint or paper exists. -->
- type: "list"
title: "Tutorials"
items:
- "Assembly overview"
- "First operant task in the home cage"
- "Basic data analysis with the Python client"
---

41 changes: 41 additions & 0 deletions content/contact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Contact"
layout: "page"
showInNav: false
slug: "/contact"
hero:
title: "Get in touch about Beatbox."
subtitle: "Questions, collaborations, feedback, and contributions are welcome."
sections:
- type: "contactForm"
title: "Contact form"
fields:
- name: "name"
label: "Name"
type: "text"
required: true
- name: "email"
label: "Email"
type: "email"
required: true
- name: "topic"
label: "Topic"
type: "choice"
options:
- "General question"
- "Building Beatbox"
- "Collaboration"
- "Contributing code or hardware"
- name: "message"
label: "Message"
type: "textarea"
required: true
- name: "recaptcha"
label: "reCAPTCHA"
type: "recaptcha"
required: true
---

You can also reach us via email at **contact@beatbox-hcm.org**.

<!-- TODO: confirm and replace with the actual contact address. -->
35 changes: 35 additions & 0 deletions content/get-beatbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Get Beatbox"
layout: "page"
showInNav: true
navOrder: 5
slug: "/get-beatbox"
hero:
title: "From open plans to turnkey systems."
subtitle: "Decide how you want to bring Beatbox into your lab."
sections:
- type: "columns"
title: "Options"
columns:
- heading: "Build it yourself"
body: |
All hardware and software files for Beatbox are open. Labs can build the system in-house using the provided CAD, PCB, firmware, and software documentation.
- heading: "Buy a pre-assembled Beatbox"
body: |
Pre-assembled units may be available through selected partners.

<!-- TODO: list current vendors, pricing ranges, and ordering process if applicable. Otherwise, display 'Coming soon'. -->
- type: "text"
title: "For labs & industry"
body: |
We envision support packages for setup, customization, and maintenance, tailored to academic labs, platforms, and industry partners.

<!-- TODO: specify whether such services exist today and how to request a quote. -->
- type: "text"
title: "Licensing"
body: |
Beatbox follows an open model, with open hardware designs and open-source firmware/software.

<!-- TODO: state the final hardware license (e.g., CERN OHL-S/OHL-W) and software license (e.g., MIT/Apache-2.0/GPLv3). -->
---

37 changes: 37 additions & 0 deletions content/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Beatbox – Open, Modular Home-Cage Cognitive Monitoring"
layout: "page"
showInNav: true
navOrder: 1
slug: "/"
hero:
title: "Beatbox is an open, modular home-cage cognitive monitoring system for mice."
subtitle: "Measure continuously. Stream in real time. Standardize across labs."
primaryCta:
label: "What is Beatbox?"
href: "/beatbox"
secondaryCta:
label: "Build or Install"
href: "/build-and-code"
sections:
- type: "featureCards"
title: "Why Beatbox"
cards:
- title: "High-precision sensing"
body: "Beatbox integrates multiple environmental and behavioral sensors (audio, activity, interaction triggers, temperature and humidity) designed for long-term automated monitoring."
- title: "Open hardware & open firmware"
body: "From CAD and PCB schematics to firmware and APIs, Beatbox is fully transparent and open, enabling inspection, modification, and community-driven improvements."
- title: "Modular cognitive tasks"
body: "Swap panels and modules to implement operant tasks, decision-making paradigms, continuous monitoring, and long-running experiments."
- type: "updates"
title: "Recent updates"
items:
- label: "v0.x.x – New firmware for the environmental sensors"
href: "#"
- label: "New tutorial: Setting up Beatbox with Docker"
href: "#"
- label: "New data validation study published"
href: "#"
---

Beatbox lets you move beyond short, stressful, experimenter-dependent sessions and towards continuous, ecological monitoring directly in the home cage.
Loading