Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

NoteVerse Mobile

React Native mobile application for the NoteVerse university management system. Built with Expo, React Native Paper, and React Navigation.

Features

  • Authentication: Secure login with JWT token storage
  • Course Management: View all enrolled courses and current semester courses
  • Course Details: Access course information, schedules, and teachers
  • Documents: View course documents and materials
  • AI Assistant: Chat interface for school-related questions (coming soon)
  • Dark Mode Support: Beautiful light and dark themes

Tech Stack

  • Expo SDK 54: Cross-platform development framework
  • React Native: Mobile app framework
  • React Native Paper: Material Design component library
  • React Navigation: Navigation and routing
  • Axios: HTTP client for API requests
  • AsyncStorage: Persistent data storage

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Expo Go app (for testing on physical devices)
  • iOS Simulator (macOS only) or Android Emulator

Installation

  1. Install dependencies:
cd note.verse.mobile
npm install
  1. Configure backend URL:

Edit src/api/axios.js and update the API_BASE_URL:

// For iOS simulator
const API_BASE_URL = 'http://localhost:3000/api';

// For Android emulator
const API_BASE_URL = 'http://10.0.2.2:3000/api';

// For physical device (replace with your computer's IP)
const API_BASE_URL = 'http://192.168.1.XXX:3000/api';

Running the App

Start the development server:

npm start

Run on specific platforms:

# iOS Simulator (macOS only)
npm run ios

# Android Emulator
npm run android

# Web browser
npm run web

Using Expo Go

  1. Install Expo Go on your mobile device
  2. Scan the QR code from the terminal
  3. The app will load on your device

Project Structure

note.verse.mobile/
├── src/
│   ├── api/                 # API integration
│   │   ├── axios.js        # HTTP client setup
│   │   ├── courses.js      # Course endpoints
│   │   └── documents.js    # Document endpoints
│   ├── contexts/           # React contexts
│   │   └── AuthContext.js  # Authentication state
│   ├── navigation/         # Navigation setup
│   │   └── AppNavigator.js # Main navigation
│   ├── pages/             # Screen components
│   │   ├── Login.js       # Login screen
│   │   ├── Derslerim.js   # Courses list
│   │   ├── CourseDetail.js # Course details
│   │   └── Assistant.js   # AI chat
│   ├── theme.js           # App theme configuration
├── App.js                 # Root component
├── app.json              # Expo configuration
└── package.json          # Dependencies

Backend Connection

The app connects to the NoteVerse backend server. Make sure the backend is running before using the app:

Required Backend Endpoints:

  • POST /api/auth/login - User authentication
  • GET /api/auth/verify - Token verification
  • GET /api/students/:id/courses - Student courses
  • GET /api/students/:id/courses/semester/:semester/:year - Current semester courses
  • GET /api/course-offerings/:id - Course details
  • GET /api/documents - Course documents

Backend Setup:

# Navigate to backend directory
cd ../note.verse.backend

# Start the backend server
npm run dev

The backend should run on http://localhost:3000

Configuration

Changing Theme

Edit src/theme.js to customize colors:

export const lightTheme = {
  colors: {
    primary: '#00A4B4',    // Primary brand color
    secondary: '#ec4899',   // Secondary color
    // ... more colors
  },
};

API Timeout

Modify timeout in src/api/axios.js:

const api = axios.create({
  baseURL: API_BASE_URL,
  timeout: 10000, // 10 seconds
});

Features by Screen

Login Screen

  • Email and password authentication
  • Secure token storage
  • Form validation
  • Loading states

Derslerim (Courses)

  • List of all enrolled courses
  • Current semester courses highlighted
  • Course cards with:
    • Course code and name
    • Semester and credits
    • Teacher information
    • Schedule and classroom
  • Pull to refresh
  • Navigation to course details

Course Detail

  • Tabbed interface:
    • Genel Bilgiler: Course information
    • Dökümanlar: Course documents
    • Sohbet: AI chat (coming soon)
  • Teacher and schedule details
  • Document listing

AI Assistant

  • Chat interface
  • Suggested questions
  • Message history
  • (SSE integration needed for live chat)

Troubleshooting

Cannot connect to backend

  1. Check if backend is running on port 3000
  2. Verify API_BASE_URL in src/api/axios.js
  3. For Android emulator, use 10.0.2.2 instead of localhost
  4. For physical devices, use your computer's local IP address

Login fails

  1. Verify backend /api/auth/login endpoint works
  2. Check network connection
  3. Ensure credentials are correct
  4. Check console for error messages

Navigation not working

  1. Make sure all navigation dependencies are installed
  2. Clear cache: npx expo start -c
  3. Reinstall dependencies: rm -rf node_modules && npm install

App crashes on startup

  1. Clear Expo cache: npx expo start -c
  2. Check for missing dependencies
  3. Verify App.js syntax
  4. Check console for error stack trace

Development

Adding a new screen

  1. Create screen in src/pages/:
// src/pages/NewScreen.js
export default function NewScreen() {
  return (
    <View>
      <Text>New Screen</Text>
    </View>
  );
}
  1. Add to navigation in src/navigation/AppNavigator.js:
import NewScreen from '../pages/NewScreen';

// In navigator:
<Stack.Screen name="NewScreen" component={NewScreen} />

Adding API endpoint

Add function to appropriate file in src/api/:

export const coursesApi = {
  // ... existing functions

  newEndpoint: async (id) => {
    const response = await api.get(`/endpoint/${id}`);
    return response.data;
  },
};

Building for Production

Build for iOS:

eas build --platform ios

Build for Android:

eas build --platform android

Note: Requires Expo EAS account. See Expo EAS Build for setup.

Known Issues

  • SSE (Server-Sent Events) for chat not yet implemented
  • File upload for documents not implemented
  • Camera/file picker integration pending
  • Push notifications not configured

Future Enhancements

  • Implement SSE for real-time chat
  • Add document upload functionality
  • Push notifications for announcements
  • Offline mode support
  • Grade viewing
  • Assignment submission
  • Calendar view
  • Dark mode toggle in settings

License

MIT

Author

NoteVerse Team


For web version, see ../note.verse.ui

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages