Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
249 changes: 235 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,246 @@
## AWS Amplify Next.js (App Router) Starter Template
# EduFlow LMS - Professional Learning Management System

This repository provides a starter template for creating applications using Next.js (App Router) and AWS Amplify, emphasizing easy setup for authentication, API, and database capabilities.
A modern, feature-rich Learning Management System built with Next.js, AWS Amplify, and Tailwind CSS. This LMS supports three user roles with comprehensive features for each.

## Overview
## 🚀 Features

This template equips you with a foundational Next.js application integrated with AWS Amplify, streamlined for scalability and performance. It is ideal for developers looking to jumpstart their project with pre-configured AWS services like Cognito, AppSync, and DynamoDB.
### 👨‍💼 Admin Features
- **User Management**: Create, edit, and manage all users (students, group leaders, admins)
- **Course Management**: Create and manage courses, modules, and lessons
- **Analytics Dashboard**: View comprehensive statistics and reports
- **System Settings**: Configure system-wide settings and preferences
- **Role Management**: Assign and manage user roles and permissions

## Features
### 👨‍🏫 Group Leader Features
- **Student Management**: Manage students in assigned courses
- **Course Creation**: Create and manage courses and content
- **Assignment Management**: Create, assign, and grade assignments
- **Grade Management**: Track and manage student grades
- **Communication**: Send messages and announcements to students
- **Progress Tracking**: Monitor student progress and performance

- **Authentication**: Setup with Amazon Cognito for secure user authentication.
- **API**: Ready-to-use GraphQL endpoint with AWS AppSync.
- **Database**: Real-time database powered by Amazon DynamoDB.
### 👨‍🎓 Student Features
- **Course Access**: View enrolled courses and content
- **Assignment Submission**: Submit assignments and track status
- **Grade Tracking**: View grades and feedback
- **Progress Monitoring**: Track learning progress and achievements
- **Communication**: Receive messages and announcements
- **Calendar**: View upcoming deadlines and events

## Deploying to AWS
## 🛠️ Technology Stack

For detailed instructions on deploying your application, refer to the [deployment section](https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components/#deploy-a-fullstack-app-to-aws) of our documentation.
- **Frontend**: Next.js 14, React 18, TypeScript
- **Styling**: Tailwind CSS with custom design system
- **Backend**: AWS Amplify Gen2
- **Authentication**: AWS Cognito with role-based access
- **Database**: AWS DynamoDB with GraphQL API
- **UI Components**: Custom components with Lucide React icons
- **State Management**: React hooks and AWS Amplify data client

## Security
## 📊 Database Schema

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
The LMS includes comprehensive data models:

## License
- **Users**: Profile management with role-based access
- **Courses**: Course creation and management
- **Modules & Lessons**: Structured learning content
- **Assignments**: Assignment creation and submission
- **Grades**: Grade tracking and feedback
- **Enrollments**: Student-course relationships
- **Messages**: Communication system
- **Announcements**: Course-wide notifications
- **Quizzes**: Interactive assessments
- **Calendar Events**: Scheduling and deadlines

This library is licensed under the MIT-0 License. See the LICENSE file.
## 🎨 Design System

- **Modern UI**: Clean, professional design with excellent UX
- **Responsive**: Fully responsive design for all devices
- **Accessibility**: WCAG compliant components
- **Dark Mode**: Support for light/dark themes
- **Custom Components**: Reusable UI components
- **Animations**: Smooth transitions and micro-interactions

## 🚀 Getting Started

### Prerequisites
- Node.js 18+
- AWS Account
- AWS CLI configured

### Installation

1. **Clone the repository**
```bash
git clone <repository-url>
cd lms-website
```

2. **Install dependencies**
```bash
npm install
```

3. **Configure AWS Amplify**
```bash
npx ampx sandbox
```

4. **Start development server**
```bash
npm run dev
```

5. **Open your browser**
Navigate to `http://localhost:3000`

## 📱 Pages & Features

### Dashboard
- Role-based dashboard with relevant statistics
- Quick actions and recent activity
- Upcoming deadlines and notifications

### Courses
- Course listing with search and filters
- Course creation and management
- Module and lesson organization

### Assignments
- Assignment creation and management
- Submission tracking
- Grade management

### Students (Admin/Group Leader)
- Student listing and management
- Enrollment management
- Progress tracking

### Grades
- Grade entry and management
- Grade distribution analytics
- Performance tracking

### Messages
- Internal messaging system
- Announcement management
- Communication tools

### Calendar
- Event scheduling
- Deadline tracking
- Course timeline

### Settings
- Profile management
- Security settings
- Notification preferences
- Privacy controls

## 🔐 Authentication & Authorization

- **AWS Cognito Integration**: Secure user authentication
- **Role-Based Access Control**: Three distinct user roles
- **Permission Management**: Granular permissions per role
- **Session Management**: Secure session handling

## 📈 Performance Features

- **Optimized Loading**: Lazy loading and code splitting
- **Caching**: Intelligent data caching
- **Responsive Images**: Optimized image delivery
- **Bundle Optimization**: Minimal bundle sizes

## 🧪 Testing & Quality

- **TypeScript**: Full type safety
- **ESLint**: Code quality enforcement
- **Error Handling**: Comprehensive error management
- **Loading States**: User-friendly loading indicators

## 🚀 Deployment

The application is configured for deployment with AWS Amplify:

1. **Build the application**
```bash
npm run build
```

2. **Deploy to AWS Amplify**
```bash
npx ampx deploy
```

## 📝 User Roles

### Admin
- Full system access
- User management
- System configuration
- Analytics and reporting

### Group Leader
- Course management
- Student management
- Assignment creation
- Grade management

### Student
- Course access
- Assignment submission
- Grade viewing
- Progress tracking

## 🔧 Configuration

### Environment Variables
Create a `.env.local` file:
```env
NEXT_PUBLIC_AMPLIFY_PROJECT_NAME=your-project-name
```

### AWS Amplify Configuration
The application uses AWS Amplify Gen2 for backend services. Configure your AWS credentials and run:
```bash
npx ampx sandbox
```

## 📚 Documentation

- **API Documentation**: GraphQL schema documentation
- **Component Library**: Storybook documentation
- **User Guides**: Role-specific user guides
- **Developer Guide**: Technical documentation

## 🤝 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

This project is licensed under the MIT License.

## 🆘 Support

For support and questions:
- Create an issue in the repository
- Check the documentation
- Contact the development team

## 🔮 Future Enhancements

- **Video Integration**: Video lesson support
- **Mobile App**: React Native mobile application
- **Advanced Analytics**: Enhanced reporting and analytics
- **Integration APIs**: Third-party service integrations
- **AI Features**: Intelligent content recommendations
- **Collaboration Tools**: Real-time collaboration features

---

Built with ❤️ using Next.js, AWS Amplify, and modern web technologies.
14 changes: 13 additions & 1 deletion amplify/auth/resource.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import { defineAuth } from "@aws-amplify/backend";

/**
* Define and configure your auth resource
* Define and configure your auth resource with user roles
* @see https://docs.amplify.aws/gen2/build-a-backend/auth
*/
export const auth = defineAuth({
loginWith: {
email: true,
},
userAttributes: {
email: {
required: true,
},
givenName: {
required: true,
},
familyName: {
required: true,
},
},
groups: ["admin", "groupLeader", "student"],
});
Loading