A Next.js application for teachers to manage student assessment rubrics with photo scanning and manual entry capabilities. Built with a mobile-first responsive design.
- Photo Upload & AI Scanning: Upload multiple photos of rubric sheets for automatic processing
- Manual Entry: Enter student assessment data manually using a structured form
- Student Cards: View all assessments with individual student performance cards
- Mobile Authentication: Appwrite-based mobile authentication for teachers
- Mobile-First Design: Fully responsive interface optimized for mobile devices
- Modern UI: Beautiful, responsive interface built with Tailwind CSS
- Internationalization: Full Arabic and English language support with RTL layout
- Frontend: Next.js 14 with TypeScript
- Styling: Tailwind CSS (Mobile-first responsive design)
- Backend: Appwrite (Database, Authentication, Storage)
- UI Components: Lucide React icons
- Form Handling: React Hook Form with Zod validation
- File Upload: React Dropzone
- Internationalization: react-i18next with Arabic and English support
tilli-assessment-1/
βββ src/ # Source code directory
β βββ app/ # Next.js app directory
β β βββ api/ # API routes
β β β βββ student-assessment-rubric-scanning/
β β β βββ route.ts # Photo processing endpoint
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ upload-photos/ # Photo upload page
β β β βββ page.tsx
β β βββ manual-entry/ # Manual entry page
β β β βββ page.tsx
β β βββ view-assessments/ # View assessments page
β β βββ page.tsx
β βββ components/ # React components
β β βββ AuthProvider.tsx # Authentication context
β β βββ LoginForm.tsx # Mobile authentication form
β β βββ ProtectedRoute.tsx # Route protection
β β βββ StarRating.tsx # Star rating component
β β βββ LanguageSwitcher.tsx # Language switcher component
β βββ lib/ # Utility libraries
β β βββ appwrite.ts # Appwrite client configuration
β β βββ auth.ts # Authentication utilities
β β βββ utils.ts # Utility functions
β β βββ emoji-assignment.ts # Emoji assignment utilities
β β βββ i18n.ts # Internationalization configuration
β βββ locales/ # Translation files
β β βββ en.json # English translations
β β βββ ar.json # Arabic translations
β βββ types/ # TypeScript type definitions
β βββ index.ts
βββ public/ # Static assets
β βββ images/ # Image assets
β βββ logo/ # App and company logos
β βββ mascot/ # Mascot images
β βββ icons/ # App icons
βββ package.json # Dependencies and scripts
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
- Node.js 18+
- npm or yarn
- Appwrite account and project
-
Clone the repository
git clone <repository-url> cd tilli-assessment-1
-
Install dependencies
npm install
-
Configure Appwrite
Update
lib/appwrite.tswith your Appwrite credentials:const client = new Client() .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite endpoint .setProject("your-project-id"); // Your project ID
-
Set up Appwrite Database
Create the following collections in your Appwrite project:
- assessments collection with attributes:
teacherName(string, required)school(string, required)grade(string, required)date(string, required)students(string, required) - JSON arrayisManualEntry(boolean, required)createdAt(datetime)updatedAt(datetime)
- assessments collection with attributes:
-
Enable Anonymous Authentication
In your Appwrite project:
- Go to Auth > Settings
- Enable Anonymous authentication
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
The application supports multiple languages with full RTL (Right-to-Left) support for Arabic:
- English (en): Default language with LTR layout
- Arabic (ar): Full RTL support with Arabic fonts
- Language Switcher: Globe icon in the navbar to switch between languages
- RTL Support: Automatic layout direction switching for Arabic
- Arabic Fonts: Noto Sans Arabic font for proper Arabic text rendering
- Persistent Language: Language preference saved in localStorage
- Dynamic Content: All text content dynamically translated
{
"common": {
"loading": "Loading...",
"error": "Error"
},
"login": {
"title": "Hello teacher! π",
"teacherName": "Teacher Name"
},
"dashboard": {
"title": "Assessment Dashboard",
"subtitle": "Choose how you'd like to create student assessments"
}
}- Create a new translation file in
src/locales/ - Add the language to the
LanguageSwitchercomponent - Update the i18n configuration in
src/lib/i18n.ts
The application is built with a mobile-first responsive design approach:
- Mobile: Default (320px+)
- Small:
sm:(640px+) - Medium:
md:(768px+) - Large:
lg:(1024px+)
- Touch-friendly buttons and inputs
- Optimized spacing and typography for mobile screens
- Responsive grids that stack on mobile
- Mobile-optimized navigation
- Touch-friendly file upload interface
- Responsive Navigation: Collapsible header with mobile-friendly buttons
- Touch-Friendly Forms: Larger touch targets and optimized input fields
- Mobile Photo Upload: Drag & drop optimized for mobile devices
- Responsive Cards: Student assessment cards that adapt to screen size
- Simple Authentication: One-click anonymous authentication
- Get Started: User clicks the "Get Started" button
- Anonymous Session: Appwrite creates an anonymous session
- Session Creation: User is authenticated and redirected to dashboard
- AuthProvider: Manages authentication state across the app
- LoginForm: Simple authentication form with single button
- ProtectedRoute: Protects routes from unauthenticated access
- Loading: Checking authentication status
- Unauthenticated: Show login form
- Authenticated: Show protected content
- Simple one-click authentication
- No phone number or SMS required
- Anonymous sessions for easy access
- Navigate to "Upload Photos"
- Fill in teacher information
- Drag & drop or select photos of rubric sheets
- Submit for AI processing
- Review and save results
- Navigate to "Manual Entry"
- Fill in teacher information
- Add students and rate each criterion
- Save assessment data
- View all saved assessments
- See individual student performance cards
- Filter by teacher, school, or date
Processes uploaded photos and returns structured student data.
Request:
FormDatawith teacher info and photos
Response:
{
teacherName: string;
school: string;
grade: string;
date: string;
students: Student[];
}interface Student {
studentName: string;
q1Answer: string; // Self Awareness - Basic emotions
q2Answer: string; // Self Awareness - Preferences
q3Answer: string; // Self Awareness - Strengths/weaknesses
q4Answer: string; // Self Management - Difficult emotions
q5Answer: string; // Self Management - Recognize others' emotions
q6Answer: string; // Self Management - Conflict resolution
q7Answer: string; // Self Management - Impulse control
}interface AssessmentRecord {
$id?: string;
teacherName: string;
school: string;
grade: string;
date: string;
students: Student[];
isManualEntry: boolean;
createdAt?: string;
updatedAt?: string;
}interface AuthUser {
$id: string;
name?: string;
phone?: string;
email?: string;
}- 1 - Beginner: Student is just starting to develop this skill
- 2 - Growing: Student shows some proficiency but needs improvement
- 3 - Expert: Student demonstrates mastery of this skill
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
Create a .env.local file:
NEXT_PUBLIC_APPWRITE_ENDPOINT=your-appwrite-endpoint
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your-project-idThe application is optimized for mobile development:
- Responsive Testing: Test on various screen sizes
- Touch Interactions: Ensure all interactions work on touch devices
- Performance: Optimize for mobile network conditions
- Accessibility: Ensure mobile accessibility standards
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support, please contact the development team or create an issue in the repository.