A web application for tracking and analyzing ABC (Antecedent-Behavior-Consequence) data for children. This tool helps parents and guardians log behavioral patterns, identify trends, and export data for professional review.
- Multi-User Support: Secure authentication allowing multiple families to use the same instance
- Child Profiles: Manage multiple children per family
- ABC Data Logging: Record detailed information about:
- Antecedent (what happened before)
- Behavior (what the child did)
- Consequence (what happened after)
- Additional context: duration, intensity, location, notes
- Analytics Dashboard: View trends and patterns including:
- Most common behaviors and triggers
- Intensity distribution
- Timeline trends
- Data Export: Export entries to CSV format for external analysis
- Responsive Design: Works on desktop and mobile devices
- Frontend: React with Vite
- Backend: Node.js with Express
- Database: SQLite with better-sqlite3
- Authentication: JWT with bcrypt
- Docker Engine 20.10+
- Docker Compose 2.0+
# Clone the repository
git clone <your-repo-url>
cd abc-journal
# Create environment file
cp .env.example .env
# Generate a secure JWT secret
openssl rand -base64 32
# Edit .env and add the JWT secret
nano .env
# Create data directory
mkdir -p data
# Start the application
docker-compose up -d
# Access at http://localhost:3100See DEPLOYMENT.md for complete deployment documentation.
- Node.js (v16 or higher)
- npm
- Install dependencies:
npm install- Initialize the database:
npm run db:migrate- Start the development server:
npm run devThis will start both the backend server (port 3100) and the frontend development server (port 3000).
- Open your browser and navigate to
http://localhost:3000
To build the frontend for production:
npm run buildTo preview the production build:
npm run preview# Production
docker-compose up -d # Start in background
docker-compose logs -f # View logs
docker-compose down # Stop
docker-compose restart # Restart
# Development (with hot reload)
docker-compose -f docker-compose.dev.yml up
# Backup database
cp data/abc-journal.db data/backup-$(date +%Y%m%d).dbnpm run dev- Start both frontend and backend in development modenpm run server:dev- Start only the backend servernpm run client:dev- Start only the frontend development servernpm run build- Build the frontend for productionnpm run lint- Run ESLintnpm test- Run testsnpm run db:migrate- Initialize or update the database schema
abc-journal/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── styles/ # CSS files
│ │ └── utils/ # Utility functions (API client)
│ └── index.html
├── server/ # Node.js backend
│ ├── db/ # Database configuration and migrations
│ ├── middleware/ # Express middleware (auth)
│ └── routes/ # API routes
└── package.json
- Register: Create an account with email and password
- Add Children: Navigate to "Manage Children" to add child profiles
- Log Entries: Click "New Entry" to record ABC data
- View Analytics: Select a child and click "View Analytics" to see trends
- Export Data: Use "Export CSV" to download data for external analysis
- JWT Secret: Always set a strong JWT_SECRET in production environments
- Generate with:
openssl rand -base64 32 - Configure in
.envfile
- Generate with:
- Data is stored locally in a SQLite database
- Passwords are hashed using bcrypt (10 rounds)
- All API endpoints (except auth) require authentication
For production deployment with Docker, reverse proxy setup, monitoring, and troubleshooting, see DEPLOYMENT.md.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT