Skip to content

fivegoerings/PeacefulAcademy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Peaceful Fields Academy - Homeschool Tracking System

A comprehensive, Missouri-compliant homeschool tracking application with offline support, real-time database synchronization, and modern web technologies.

πŸš€ Features

Core Functionality

  • Student Management: Add, edit, and track student information
  • Course Management: Create and organize courses by subject
  • Hour Logging: Track daily learning hours with location and notes
  • Portfolio Management: Store and organize work samples
  • Compliance Reporting: Generate Missouri-compliant annual reports
  • Transcript Generation: Create official high school transcripts
  • Diploma Creation: Generate printable diplomas

Technical Features

  • Progressive Web App (PWA): Works offline with service worker caching
  • Real-time Database: Neon PostgreSQL with Netlify Functions
  • Modern UI: Responsive design with accessibility features
  • Data Validation: Comprehensive input validation and error handling
  • Backup & Restore: Import/export functionality for data portability
  • Admin Panel: Database monitoring and management interface

πŸ› οΈ Technology Stack

  • Frontend: Vanilla JavaScript, HTML5, CSS3
  • Backend: Netlify Functions (Node.js)
  • Database: Neon PostgreSQL
  • ORM: Drizzle ORM
  • Deployment: Netlify
  • Caching: Service Worker with multiple strategies
  • Icons: Custom SVG and PNG icons

πŸ“‹ Requirements

  • Node.js 18.0.0 or higher
  • Netlify account
  • Neon PostgreSQL database

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/fivegoerings/peaceful-academy.git
cd peaceful-academy

2. Install Dependencies

npm install

3. Environment Setup

Create a .env file in the root directory:

NETLIFY_DATABASE_URL=your_neon_database_url_here

4. Database Setup

# Generate database migrations
npm run db:generate

# Apply migrations
npm run db:migrate

5. Local Development

# Start development server
npm run dev

# Or start with functions
npm run functions:dev

6. Deploy to Netlify

# Deploy to production
npm run deploy

πŸ“ Project Structure

peacefulFieldsAcademy/
β”œβ”€β”€ admin/                 # Admin panel interface
β”‚   β”œβ”€β”€ app.js            # Admin JavaScript
β”‚   β”œβ”€β”€ index.html        # Admin HTML
β”‚   └── style.css         # Admin styles
β”œβ”€β”€ assets/               # Static assets
β”‚   β”œβ”€β”€ icon-*.png        # App icons
β”‚   └── icon.svg          # Main icon
β”œβ”€β”€ db/                   # Database configuration
β”‚   β”œβ”€β”€ index.ts          # Database connection
β”‚   └── schema.ts         # Drizzle schema
β”œβ”€β”€ netlify/
β”‚   └── functions/        # Netlify serverless functions
β”‚       β”œβ”€β”€ api.mjs       # API endpoints
β”‚       └── db.mjs        # Database operations
β”œβ”€β”€ index.html            # Main application
β”œβ”€β”€ manifest.webmanifest  # PWA manifest
β”œβ”€β”€ sw.js                 # Service worker
β”œβ”€β”€ package.json          # Dependencies and scripts
β”œβ”€β”€ netlify.toml          # Netlify configuration
└── drizzle.config.ts     # Drizzle configuration

πŸ”§ Configuration

Database Schema

The application uses a comprehensive database schema with the following tables:

  • students: Student information and demographics
  • courses: Course definitions and subjects
  • logs: Daily hour tracking entries
  • portfolio: Work samples and file metadata
  • files: File storage metadata
  • settings: Application configuration

Environment Variables

  • NETLIFY_DATABASE_URL: Neon PostgreSQL connection string

🎯 Key Improvements Made

1. Database Consistency

  • Unified schema across all functions
  • Proper foreign key relationships
  • Comprehensive data validation
  • TypeScript types for all database operations

2. Error Handling & Validation

  • Input validation on all forms
  • Comprehensive error messages
  • Graceful error recovery
  • User-friendly notifications

3. Security Enhancements

  • SQL injection prevention
  • Input sanitization
  • CORS configuration
  • Environment variable validation

4. User Experience

  • Loading states and feedback
  • Toast notifications
  • Responsive design
  • Accessibility improvements
  • Keyboard navigation support

5. Performance & Reliability

  • Service worker with multiple caching strategies
  • Offline functionality
  • Background sync capabilities
  • Memory leak prevention

6. Code Quality

  • Consistent coding standards
  • TypeScript integration
  • Modular architecture
  • Comprehensive documentation

πŸ“Š Missouri Compliance

The application is designed to meet Missouri homeschool requirements:

  • 1,000 Total Hours: Track total learning hours per student
  • 600 Core Hours: Reading, Language Arts, Mathematics, Science, Social Studies
  • 400 Core @ Home: Core subjects completed at home
  • Documentation: Daily logs, portfolio samples, and evaluations
  • Reporting: Annual compliance reports and transcripts

πŸ” Admin Panel

Access the admin panel at /admin to:

  • Monitor database health and performance
  • View real-time statistics
  • Manage students, courses, and logs
  • Monitor API endpoints

πŸ“± PWA Features

  • Offline Support: Works without internet connection
  • App Installation: Install as native app
  • Background Sync: Sync data when connection restored
  • Push Notifications: Real-time updates
  • Responsive Design: Works on all devices

🚨 Error Handling

The application includes comprehensive error handling:

  • Network connectivity issues
  • Database connection problems
  • Invalid user input
  • File upload errors
  • Service worker failures

πŸ”§ Development Scripts

npm run dev              # Start development server
npm run build            # Build for production
npm run deploy           # Deploy to Netlify
npm run functions:dev    # Start functions locally
npm run functions:build  # Build functions
npm run db:generate      # Generate database migrations
npm run db:migrate       # Apply migrations
npm run db:studio        # Open Drizzle Studio
npm run generate-icons   # Generate app icons

πŸ§ͺ Testing

npm test                 # Run tests (when implemented)

πŸ“ˆ Monitoring

  • Database health monitoring
  • API endpoint status
  • Error tracking and logging
  • Performance metrics
  • User activity analytics

πŸ”’ Security Considerations

  • All database queries use parameterized statements
  • Input validation on all endpoints
  • CORS properly configured
  • Environment variables for sensitive data
  • Regular security updates

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

MIT License - see LICENSE file for details

πŸ†˜ Support

For support and questions:

  • Create an issue on GitHub
  • Check the documentation
  • Review the admin panel for system status

πŸ”„ Changelog

Version 2.0.0 (Current)

  • Complete database schema overhaul
  • Enhanced error handling and validation
  • Improved user experience and accessibility
  • Service worker improvements
  • Admin panel enhancements
  • Security improvements
  • Performance optimizations

Version 1.0.0 (Previous)

  • Initial release
  • Basic functionality
  • Simple database schema

Peaceful Fields Academy - Empowering homeschool families with modern, compliant tracking tools.

About

Peaceful Academy homeschool record keeping

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •