Spaces:
Configuration error
Configuration error
Pratham200Rajbhar commited on
Commit ·
a0406a2
1
Parent(s): 2dda8dd
deployed
Browse files- backend/app/core/config.py +1 -1
- credentials.txt +11 -0
- frontend/.gitignore +1 -0
- mobile/.gitignore +3 -0
- mobile/lib/core/constants.dart +3 -5
- mobile/lib/main.dart +4 -0
- mobile/pubspec.lock +8 -0
- mobile/pubspec.yaml +3 -0
backend/app/core/config.py
CHANGED
|
@@ -32,7 +32,7 @@ class Settings(BaseSettings):
|
|
| 32 |
LIVENESS_WEIGHT: float = 0.30
|
| 33 |
BACKGROUND_WEIGHT: float = 0.20
|
| 34 |
PASS_THRESHOLD: float = 0.75
|
| 35 |
-
FRONTEND_URL: str = Field(default="
|
| 36 |
ENVIRONMENT: str = "development"
|
| 37 |
LOG_LEVEL: str = Field(default="DEBUG", description="Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL")
|
| 38 |
|
|
|
|
| 32 |
LIVENESS_WEIGHT: float = 0.30
|
| 33 |
BACKGROUND_WEIGHT: float = 0.20
|
| 34 |
PASS_THRESHOLD: float = 0.75
|
| 35 |
+
FRONTEND_URL: str = Field(default="https://smartattandancesystem.vercel.app", description="Frontend URL for CORS")
|
| 36 |
ENVIRONMENT: str = "development"
|
| 37 |
LOG_LEVEL: str = Field(default="DEBUG", description="Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL")
|
| 38 |
|
credentials.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
------------------------------------------------------------------------
|
| 2 |
+
LOGIN CREDENTIALS
|
| 3 |
+
------------------------------------------------------------------------
|
| 4 |
+
ADMIN → admin@smartattendance.edu.in / Admin@123
|
| 5 |
+
TEACHER → emp001@smartattendance.edu.in / Teacher@123
|
| 6 |
+
STUDENT → cse2025001@smartattendance.edu.in / Student@123
|
| 7 |
+
|
| 8 |
+
All student accounts: password = Student@123
|
| 9 |
+
All teacher accounts: password = Teacher@123
|
| 10 |
+
========================================================================
|
| 11 |
+
|
frontend/.gitignore
CHANGED
|
@@ -34,3 +34,4 @@ next-env.d.ts
|
|
| 34 |
# OS files
|
| 35 |
.DS_Store
|
| 36 |
Thumbs.db
|
|
|
|
|
|
| 34 |
# OS files
|
| 35 |
.DS_Store
|
| 36 |
Thumbs.db
|
| 37 |
+
.vercel
|
mobile/.gitignore
CHANGED
|
@@ -39,3 +39,6 @@ app.*.map.json
|
|
| 39 |
|
| 40 |
# OS files
|
| 41 |
.DS_Store
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
# OS files
|
| 41 |
.DS_Store
|
| 42 |
+
|
| 43 |
+
# Environment files
|
| 44 |
+
.env
|
mobile/lib/core/constants.dart
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
library;
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
defaultValue: 'http://10.0.2.2:8000/api/v1',
|
| 7 |
-
);
|
| 8 |
|
| 9 |
const String kHiveBoxProfile = 'sas_profile';
|
| 10 |
const String kHiveBoxOfflineQueue = 'sas_offline_queue';
|
|
|
|
| 1 |
library;
|
| 2 |
|
| 3 |
+
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
| 4 |
+
|
| 5 |
+
final String kApiBaseUrl = dotenv.env['API_BASE_URL'] ?? '';
|
|
|
|
|
|
|
| 6 |
|
| 7 |
const String kHiveBoxProfile = 'sas_profile';
|
| 8 |
const String kHiveBoxOfflineQueue = 'sas_offline_queue';
|
mobile/lib/main.dart
CHANGED
|
@@ -18,6 +18,7 @@ import 'package:firebase_messaging/firebase_messaging.dart';
|
|
| 18 |
import 'package:smart_attendance_app/data/repositories/config_repository.dart';
|
| 19 |
import 'package:smart_attendance_app/domain/enums/auth_state.dart';
|
| 20 |
import 'package:smart_attendance_app/features/auth/providers/auth_provider.dart';
|
|
|
|
| 21 |
|
| 22 |
@pragma('vm:entry-point')
|
| 23 |
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
|
@@ -44,6 +45,8 @@ void callbackDispatcher() {
|
|
| 44 |
Workmanager().executeTask((task, inputData) async {
|
| 45 |
try {
|
| 46 |
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
|
|
| 47 |
final hiveService = HiveService();
|
| 48 |
await hiveService.initialize();
|
| 49 |
|
|
@@ -70,6 +73,7 @@ void callbackDispatcher() {
|
|
| 70 |
Future<void> main() async {
|
| 71 |
await runZonedGuarded(() async {
|
| 72 |
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
| 73 |
|
| 74 |
FlutterError.onError = (FlutterErrorDetails details) {
|
| 75 |
FlutterError.presentError(details);
|
|
|
|
| 18 |
import 'package:smart_attendance_app/data/repositories/config_repository.dart';
|
| 19 |
import 'package:smart_attendance_app/domain/enums/auth_state.dart';
|
| 20 |
import 'package:smart_attendance_app/features/auth/providers/auth_provider.dart';
|
| 21 |
+
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
| 22 |
|
| 23 |
@pragma('vm:entry-point')
|
| 24 |
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
|
|
|
| 45 |
Workmanager().executeTask((task, inputData) async {
|
| 46 |
try {
|
| 47 |
WidgetsFlutterBinding.ensureInitialized();
|
| 48 |
+
await dotenv.load(fileName: ".env");
|
| 49 |
+
|
| 50 |
final hiveService = HiveService();
|
| 51 |
await hiveService.initialize();
|
| 52 |
|
|
|
|
| 73 |
Future<void> main() async {
|
| 74 |
await runZonedGuarded(() async {
|
| 75 |
WidgetsFlutterBinding.ensureInitialized();
|
| 76 |
+
await dotenv.load(fileName: ".env");
|
| 77 |
|
| 78 |
FlutterError.onError = (FlutterErrorDetails details) {
|
| 79 |
FlutterError.presentError(details);
|
mobile/pubspec.lock
CHANGED
|
@@ -318,6 +318,14 @@ packages:
|
|
| 318 |
description: flutter
|
| 319 |
source: sdk
|
| 320 |
version: "0.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
flutter_lints:
|
| 322 |
dependency: "direct dev"
|
| 323 |
description:
|
|
|
|
| 318 |
description: flutter
|
| 319 |
source: sdk
|
| 320 |
version: "0.0.0"
|
| 321 |
+
flutter_dotenv:
|
| 322 |
+
dependency: "direct main"
|
| 323 |
+
description:
|
| 324 |
+
name: flutter_dotenv
|
| 325 |
+
sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b
|
| 326 |
+
url: "https://pub.dev"
|
| 327 |
+
source: hosted
|
| 328 |
+
version: "5.2.1"
|
| 329 |
flutter_lints:
|
| 330 |
dependency: "direct dev"
|
| 331 |
description:
|
mobile/pubspec.yaml
CHANGED
|
@@ -17,6 +17,7 @@ dependencies:
|
|
| 17 |
dio: ^5.7.0
|
| 18 |
http_parser: ^4.1.0
|
| 19 |
web_socket_channel: ^3.0.1
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
# Camera
|
|
@@ -69,3 +70,5 @@ dev_dependencies:
|
|
| 69 |
|
| 70 |
flutter:
|
| 71 |
uses-material-design: true
|
|
|
|
|
|
|
|
|
| 17 |
dio: ^5.7.0
|
| 18 |
http_parser: ^4.1.0
|
| 19 |
web_socket_channel: ^3.0.1
|
| 20 |
+
flutter_dotenv: ^5.2.1
|
| 21 |
|
| 22 |
|
| 23 |
# Camera
|
|
|
|
| 70 |
|
| 71 |
flutter:
|
| 72 |
uses-material-design: true
|
| 73 |
+
assets:
|
| 74 |
+
- .env
|