be4d43105e
Node.js/Express backend + vanilla JS frontend. Features: real-time collaborative whiteboard (SSE), multi-page support, LaTeX formulas, shapes/connectors, coordinate systems, number lines, compass, zoom/pan, Catmull-Rom pencil smoothing, ruler/protractor with rotation & resize controls, minimap navigation overlay, auto-measurements, multi-page thumbnails sidebar, PNG export, page templates. Student/teacher workflows: classes, assignments, library, dashboard. Mobile responsive. SQLite (better-sqlite3). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const ctrl = require('../controllers/redBookController');
|
|
const { requireAuth, optionalAuth } = require('../middleware/auth');
|
|
|
|
// Public (or optional auth for collection status)
|
|
router.get('/groups', ctrl.getGroups);
|
|
router.get('/habitats', ctrl.getHabitats);
|
|
router.get('/stats', optionalAuth, ctrl.getStats);
|
|
router.get('/map-data', ctrl.getMapData);
|
|
router.get('/food-web', ctrl.getFoodWeb);
|
|
router.get('/daily', optionalAuth, ctrl.getDaily);
|
|
router.get('/species', optionalAuth, ctrl.getSpecies);
|
|
router.get('/species/:id', optionalAuth, ctrl.getSpeciesById);
|
|
router.get('/biome/:habitatId', ctrl.getBiomeSpecies);
|
|
|
|
// Auth required
|
|
router.post('/species/:id/collect', requireAuth, ctrl.collectSpecies);
|
|
router.get('/collection', requireAuth, ctrl.getCollection);
|
|
router.get('/quests', optionalAuth, ctrl.getQuests);
|
|
router.post('/quests/:id/start', requireAuth, ctrl.startQuest);
|
|
router.get('/sightings', optionalAuth, ctrl.getSightings);
|
|
router.post('/sightings', requireAuth, ctrl.addSighting);
|
|
|
|
module.exports = router;
|