BrightBoost is an interactive learning platform designed to help teachers create engaging lessons and students to learn in a fun, gamified environment.
- Teacher Accounts & Dashboard: Teachers can sign up, log in, and manage their lessons through a dedicated dashboard.
- Student Accounts & Dashboard: Students can sign up, log in, and access assigned lessons and activities.
- Lesson Creation & Management: Teachers can create, edit, and delete lessons, including title, content, category, and status.
- Student Lesson Viewing & Activity Tracking: Students can view lessons assigned to them and mark activities as complete.
- Persistent Data Storage: User and lesson data is stored persistently using Azure PostgreSQL database.
- Role-Based Access Control: Clear distinction between teacher and student functionalities.
- E2E Tested Core Flow: The primary user journeys for teachers and students have been tested.
A typical demo showcases:
- A teacher signing up or logging in.
- The teacher navigating their dashboard and creating a new lesson (e.g., "Introduction to Photosynthesis", Category: "Science", Content: "Learn about how plants make food.", Status: "Published").
- The teacher verifying the lesson is displayed on their dashboard.
- The teacher logging out.
- A student signing up or logging in.
- The student viewing the "Introduction to Photosynthesis" lesson on their dashboard.
- The student marking an activity associated with this lesson as "complete".
- The student logging out.
This project is built with a modern web technology stack:
- Frontend:
- React
- Vite
- TypeScript
- Tailwind CSS
- shadcn-ui (for UI components)
- React Router (for navigation)
- Context API (for state management, e.g., AuthContext)
- Backend:
- AWS Lambda with API Gateway
- Aurora PostgreSQL (AWS RDS)
- JSON Web Tokens (JWT) for authentication
bcryptjsfor password hashing
- Testing:
- Vitest (for unit/integration tests)
- Cypress (for End-to-End tests)
- Development Tools:
- ESLint (for linting)
- Storybook (for UI component development and testing)
To get a local copy up and running, follow these simple steps.
Prerequisites:
- Node.js (v18 or later recommended)
- npm (comes with Node.js)
Installation & Setup:
-
Clone the repository:
git clone <YOUR_GIT_URL> # Replace <YOUR_GIT_URL> with the actual Git URL of this project cd <YOUR_PROJECT_NAME> # Replace <YOUR_PROJECT_NAME> with the directory name
-
Install dependencies: This will install both frontend and backend dependencies.
npm install cd src/lambda && npm install && cd ../..
-
Configure Environment Variables: Create a
.envfile in the root of the project:VITE_AWS_API_URL=https://your-api-gateway-url.execute-api.region.amazonaws.com/stage
Replace with your actual AWS API Gateway URL. Backend environment variables are managed through AWS Secrets Manager.
-
Running the Application: To run the frontend Vite development server:
npm run dev
This command starts:
- Frontend (Vite):
http://localhost:5173(or another port if 5173 is busy)
- Frontend (Vite):
-
Running the Backend Locally: The backend now runs on AWS Lambda. For local development, you can use the mock server:
npm run server
This will start a local Express server for development.
Live Application: https://black-sand-053455d1e.6.azurestaticapps.net
The application is deployed using Azure Static Web Apps for the frontend with an AWS Lambda backend.
This project uses a hybrid deployment approach:
The backend is deployed to AWS Lambda using GitHub Actions CI/CD pipeline. The deployment workflow is defined in .github/workflows/aws-lambda-deploy.yml.
Backend Infrastructure:
- AWS Lambda for serverless backend functions
- Aurora PostgreSQL (AWS RDS) for data persistence
- API Gateway for HTTP API endpoints
- AWS Secrets Manager for secure credential storage
The frontend continues to be deployed to Azure Static Web Apps for optimal performance and global distribution.
Frontend URL: https://black-sand-053455d1e.6.azurestaticapps.net
The deployment pipeline:
- Frontend: Builds and deploys React application to Azure Static Web Apps
- Backend: Builds TypeScript Lambda functions and deploys to AWS using SAM
- Database: Uses Aurora PostgreSQL cluster in AWS
- API Integration: Frontend calls AWS API Gateway endpoints directly
Environment Variables:
VITE_AWS_API_URL: AWS API Gateway endpoint URL- Backend credentials stored in AWS Secrets Manager
├── public/ # Static assets
├── src/ # Frontend source code (React, Vite, TypeScript)
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React contexts (e.g., AuthContext)
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ ├── pages/ # Page components (routed views)
│ ├── services/ # API service integration
│ ├── App.tsx # Main application component
│ └── main.tsx # Entry point for the React app
├── src/lambda/ # AWS Lambda backend functions
│ ├── teacher-signup.ts # Teacher signup Lambda function
│ ├── package.json # Lambda dependencies
│ └── tsconfig.json # TypeScript configuration
├── prisma/ # Prisma ORM schema and migrations
│ ├── schema.prisma # Database schema definition
│ └── migrations/ # Database migrations
├── scripts/ # Deployment and utility scripts
├── cypress/ # Cypress E2E tests
├── vite.config.ts # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.js # PostCSS configuration
├── README.md # This file
└── package.json # Project dependencies and scripts
This project was initially scaffolded or managed by Lovable. While direct local development (as described in "Getting Started") is the primary recommended method, you might find references to Lovable.
Use your preferred IDE (Recommended)
Clone this repo and push changes. Pushed changes will also be reflected in Lovable if the project is still linked. The only requirement is having Node.js & npm installed - install with nvm
Use Lovable (If Applicable)
If the project is actively managed via Lovable: Visit the Lovable Project and start prompting. Changes made via Lovable will be committed automatically to this repo.
Edit a file directly in GitHub / Use GitHub Codespaces Standard GitHub workflows are always available.
Lovable's specific advice was: "We don't support custom domains (yet). If you want to deploy your project under your own domain then we recommend using Netlify. Visit our docs for more details: Custom domains"
Edit a file directly in GitHub
- Navigate to the desired file(s).
- Click the "Edit" button (pencil icon) at the top right of the file view.
- Make your changes and commit the changes.
Use GitHub Codespaces
- Navigate to the main page of your repository.
- Click on the "Code" button (green button) near the top right.
- Select the "Codespaces" tab.
- Click on "New codespace" to launch a new Codespace environment.
- Edit files directly within the Codespace and commit and push your changes once you're done.
This project is built with:
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
- AWS Lambda (backend)
- Prisma ORM
- AWS Aurora PostgreSQL
The project uses a hybrid deployment strategy:
Frontend: Automatically deployed to Azure Static Web Apps via GitHub Actions
- Production URL: https://black-sand-053455d1e.6.azurestaticapps.net
Backend: Automatically deployed to AWS Lambda via GitHub Actions
For deployment configuration details, refer to the Deployment Guide document.
BrightBoost includes comprehensive testing:
- Unit Tests: Component and utility testing with Vitest
- E2E Tests: End-to-end workflows with Cypress
- Linting: Code quality checks with ESLint
# Run all tests
npm test
# Run specific test types
npm run test:unit
npm run test:e2e
npm run lintFor detailed testing information, see the Testing Guide.
For deployments to Azure Static Web Apps, custom domains can be configured directly within the Azure Portal under the Static Web App's "Custom domains" section. SSL certificates are automatically provisioned for custom domains.