Student Mark System
A web application for managing student marks and academic records.
Features
- User authentication (Admin, Teacher, Student roles)
- Mark entry and management
- Student record management
- Subject management
- Role-based access control
Tech Stack
- React
- TypeScript
- Vite
- Firebase (Authentication, Realtime Database)
- React Router
- CSS Modules
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- Firebase project
Local Development Setup
- Clone the repository
git clone https://github.com/yourusername/StudentMarkSystem.git
cd StudentMarkSystem
- Run the setup script
npm run setup
This script will guide you through setting up your environment variables and Firebase configuration.
- Install dependencies
npm install
- Run the development server
npm run dev
The application will be available at http://localhost:5173.
Initial User Setup
The system comes with three default user accounts:
Admin
- Email: admin@school.com
- Password: Admin@123
Teacher
Email: teacher@school.com
Password: Teacher@123
Student
- Email: student@school.com
- Password: Student@123
Building for Production
npm run build
This will create a dist directory with the production build.
Deployment
Automated Deployment with GitHub Actions
This project includes GitHub Actions workflows for CI/CD:
- Continuous Integration: Automatically runs linting and builds the project on push and pull requests to main branch.
- Firebase Deployment: Automatically deploys to Firebase on push to main branch.
- Netlify Deployment: Automatically deploys to Netlify on push to main branch.
To use these workflows:
Set up the following secrets in your GitHub repository:
FIREBASE_API_KEYFIREBASE_AUTH_DOMAINFIREBASE_PROJECT_IDFIREBASE_STORAGE_BUCKETFIREBASE_MESSAGING_SENDER_IDFIREBASE_APP_IDFIREBASE_MEASUREMENT_IDFIREBASE_DATABASE_URLFIREBASE_SERVICE_ACCOUNT(for Firebase deployment)NETLIFY_AUTH_TOKEN(for Netlify deployment)NETLIFY_SITE_ID(for Netlify deployment)
Push to the main branch to trigger deployments.
Manual Deployment to Netlify
- Create a new site on Netlify
- Connect your GitHub repository
- Set the build command to
npm run build - Set the publish directory to
dist
- Configure environment variables
Add all the environment variables from your .env file to your Netlify site's environment variables section.
- Deploy
Netlify will automatically deploy your site when you push changes to your connected repository.
Manual Deployment to Firebase
- Install Firebase CLI
npm install -g firebase-tools
- Login to Firebase
firebase login
- Initialize Firebase in your project (if not already done)
firebase init
- Build the project
npm run build
- Deploy to Firebase
firebase deploy
Firebase Configuration
This project requires a Firebase project with the following services enabled:
- Authentication (Email/Password provider)
- Realtime Database
Setting Up Firebase
- Create a new Firebase project at firebase.google.com
- Enable Email/Password authentication
- Create a Realtime Database
- Set up security rules for your database
- Register a web app in your Firebase project to get your configuration
License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Log in or sign up for Devpost to join the conversation.