A comprehensive mobile application for managing library students, fees, and analytics built with Angular + Ionic + Firebase.
library-app/
βββ src/
β βββ app/
β β βββ core/ # Core services (Auth, Firestore, Payment)
β β βββ shared/ # Shared components, pipes, utilities
β β βββ modules/ # Feature modules (Dashboard, Students, Fees, Settings)
β β βββ app.module.ts # Root module
β β βββ app-routing.module.ts
β β βββ app.component.*
β βββ environments/ # Environment configs
β βββ styles.scss # Global styles
β βββ main.ts # Application entry point
β βββ index.html
βββ firebase/
β βββ functions/ # Cloud Functions (placeholder)
β βββ firestore.rules # Security rules
β βββ firestore.indexes.json # Firestore indexes
βββ angular.json
βββ ionic.config.json
βββ capacitor.config.json
βββ package.json
- Node.js v18+ installed
- npm or yarn
- Firebase account (free tier works)
- Android SDK (for mobile build)
# Navigate to project directory
cd "d:\Library App"
# Install dependencies
npm install
# Install Ionic CLI (if not already installed)
npm install -g @ionic/cliCreate a Firebase project:
- Go to console.firebase.google.com
- Create new project "library-app-prod"
- Enable Firestore Database (Start in Production mode)
- Enable Firebase Auth (Email/Password + Google OAuth)
- Copy credentials to
src/environments/environment.ts:
firebase: {
apiKey: "YOUR_API_KEY",
authDomain: "library-app-prod.firebaseapp.com",
projectId: "library-app-prod",
storageBucket: "library-app-prod.appspot.com",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
}# Install Firebase CLI
npm install -g firebase-tools
# Login
firebase login
# Deploy rules
firebase deploy --only firestore:rules,firestore:indexes --project library-app-prod# Development server
npm start
# Or use Ionic serve
ionic serve
# Opens http://localhost:4200Test credentials (after signup):
- Email: test@library.com
- Password: test123456
# Install Capacitor
npm install @capacitor/core @capacitor/cli
# Add Android platform
npx cap add android
# Build Angular project
npm run build:prod
# Copy to Android
npx cap copy android
# Build APK
npx cap build android
# Or open in Android Studio
npx cap open androidOutput: android/app/build/outputs/apk/release/app-release.apk
npx cap add ios
npm run build:prod
npx cap copy ios
npx cap build ios
npx cap open ios- angular.json: Change project name
- ionic.config.json: Update app name
- capacitor.config.json: Update
appIdtocom.vikas.librarypro - package.json: Update name
In src/environments/environment.ts:
razorpay: {
keyId: "YOUR_RAZORPAY_KEY_ID"
}signup(email, password, libraryName, city)login(email, password)logout()- Observable:
userProfile,isAuthenticated
create(collectionName, data)read(collectionName, docId)update(collectionName, docId, data)delete(collectionName, docId)list(collectionName)search(collectionName, field, value)
addStudent(data)updateStudent(studentId, data)deleteStudent(studentId)getAllStudents()searchStudents(searchTerm)getStudentStats()
createFee(data)createBulkFees(studentIds, month, amount, dueDate)markAsPaid(feeId, paymentMethod)getFeesByStatus(status)getFeeStats()
- All data scoped to
libraryIdvia Firestore security rules - Auth guard on all protected routes
- Custom claims can be added via Cloud Function (production)
Collections:
users/{uid}- User profileslibraries/{libraryId}- Library datalibraries/{libraryId}/students/{studentId}- Studentslibraries/{libraryId}/fees/{feeId}- Feeslibraries/{libraryId}/transactions/{txnId}- Transactions
See docs/ARCHITECTURE.md for detailed schema.
- Framework: Ionic UI components
- Styles: SCSS (global + component scoped)
- Theme: Primary color #3399cc
- Responsive: Mobile-first design
# Run unit tests
npm test
# Run with coverage
ng test --code-coveragefirebase deploy --only hosting- Generate signed APK
- Create developer account (βΉ25)
- Upload to Play Console
- Fill app details + screenshots
- Submit for review (24-72 hours)
See docs/DEPLOYMENT.md for detailed steps.
Issue: "Firebase initialization failed"
- Check Firebase credentials in
environment.ts - Verify project exists in Firebase Console
Issue: "Authentication module not found"
- Run
npm install @angular/fire firebase
Issue: "Styles not loading"
- Clear
node_modules/.cacheand rebuild
Issue: "Cordova not found"
- Run
npm install -g @ionic/cli
This is a personal project. Fork and modify as needed.
MIT License - See LICENSE file
Vikas - LibraryPro Creator
Ready to ship? π
- Add Firebase credentials
- Run
npm install && npm start - Create account and test
- Build APK for Play Store
Questions? Check the docs folder or review the services!