The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

Design a Smart Public Wi-Fi Access Management App Using Object-Oriented Design

A Smart Public Wi-Fi Access Management App can enhance the user experience by streamlining Wi-Fi access in public spaces, while also ensuring security, fairness, and management of network resources. The system can help manage authentication, usage tracking, bandwidth allocation, and provide analytics for both users and administrators. Below is a design based on Object-Oriented Design (OOD) principles.

1. Requirements

Functional Requirements:

  1. User Authentication: Users should be able to authenticate using their email, social media, or mobile number.

  2. Access Control: Admins can set bandwidth limits or restrict access based on user roles (e.g., free access, premium users).

  3. Session Tracking: Track user sessions including login time, duration, data usage, and network quality.

  4. Location-Based Access: Users can access the network only in designated areas or hotspots.

  5. Device Management: The app should allow users to manage devices connected to the Wi-Fi.

  6. Usage Analytics: Both users and administrators can track usage history, data consumption, and network performance.

  7. Guest Access: Temporary guest accounts for non-registered users with limited access.

Non-Functional Requirements:

  1. Scalability: The system should be able to handle large numbers of users in public spaces.

  2. Security: The system should ensure secure access (e.g., encrypted communication, secure login mechanisms).

  3. Performance: The system should provide quick access and minimal latency.

  4. Availability: The Wi-Fi system should be available 99.9% of the time, with quick recovery from failures.


2. Object-Oriented Design Classes

2.1 Class: User

Attributes:

  • userId: String

  • name: String

  • email: String

  • phoneNumber: String

  • role: Enum (Guest, Free, Premium)

  • connectedDevices: List<Device>

  • sessionHistory: List<Session>

Methods:

  • authenticate(): Authenticates user based on their credentials.

  • connectToWiFi(): Connects user to a Wi-Fi hotspot.

  • disconnectFromWiFi(): Disconnects the user from Wi-Fi.

  • getSessionHistory(): Returns historical data of Wi-Fi usage.

  • manageDevices(): Allows the user to manage devices connected to their account.

2.2 Class: Session

Attributes:

  • sessionId: String

  • userId: String

  • startTime: DateTime

  • endTime: DateTime

  • dataConsumed: Float

  • duration: Integer (in minutes)

  • location: String

  • device: Device

Methods:

  • startSession(): Initiates a new session when user connects.

  • endSession(): Ends the session and logs data usage.

  • getSessionDetails(): Retrieves session information for tracking.

2.3 Class: Device

Attributes:

  • deviceId: String

  • deviceType: String (e.g., Laptop, Smartphone, Tablet)

  • macAddress: String

  • connectionStatus: Enum (Connected, Disconnected)

  • dataUsage: Float

Methods:

  • connectToNetwork(): Connects the device to a Wi-Fi hotspot.

  • disconnectFromNetwork(): Disconnects the device from the Wi-Fi network.

  • trackDataUsage(): Monitors the device’s data usage during the session.

2.4 Class: WiFiHotspot

Attributes:

  • hotspotId: String

  • location: String

  • status: Enum (Active, Inactive)

  • bandwidthLimit: Float

  • connectedUsers: List<User>

Methods:

  • activate(): Activates the hotspot for user connection.

  • deactivate(): Deactivates the hotspot.

  • checkAvailableBandwidth(): Returns available bandwidth for users.

  • addUser(): Adds a user to the connected list.

  • removeUser(): Removes a user when they disconnect.

2.5 Class: Admin

Attributes:

  • adminId: String

  • name: String

  • permissions: Enum (Full, Limited)

  • managedHotspots: List<WiFiHotspot>

Methods:

  • setBandwidthLimit(): Sets the bandwidth limit for a hotspot.

  • viewUsageAnalytics(): Displays the network’s performance and user usage data.

  • blockUser(): Blocks a user from connecting to the network.

  • addNewHotspot(): Adds a new hotspot to the network.

  • removeHotspot(): Removes a hotspot from the network.

2.6 Class: Analytics

Attributes:

  • analyticsId: String

  • totalDataConsumed: Float

  • averageConnectionTime: Float

  • userDemographics: Map<String, Integer>

  • performanceMetrics: Map<String, Float>

Methods:

  • generateUsageReport(): Generates reports on user data consumption, connection times, etc.

  • generatePerformanceReport(): Tracks network performance and usage patterns.

  • getPeakUsageTimes(): Returns data on the times when the network is most congested.


3. Relationships between Objects

  • User to Session: One user can have many sessions. A user can connect to the Wi-Fi multiple times, and each connection session has a start and end time.

  • User to Device: A user can manage multiple devices. Devices are used by the user to connect to the Wi-Fi network.

  • WiFiHotspot to User: A Wi-Fi hotspot can have many users connected at a time, and each user can connect to different hotspots.

  • Admin to WiFiHotspot: An admin can manage multiple Wi-Fi hotspots, configuring settings, usage policies, and viewing usage data.

  • Session to Device: A session corresponds to a particular device being used during the connection period.


4. App Workflow

  1. User Flow:

    • The user opens the app and logs in via email, phone number, or social media.

    • The app checks the available hotspots in the vicinity and shows the nearest ones.

    • The user selects a Wi-Fi hotspot to connect to. If the user is authenticated, the connection is established.

    • The app tracks the session, showing real-time data usage and connection duration.

    • After the session ends, the user can view detailed reports on their usage, including data consumed and connection time.

  2. Admin Flow:

    • The admin logs in and views a dashboard displaying real-time statistics of all active hotspots.

    • Admins can set bandwidth limits for each hotspot and view user sessions.

    • The admin can block users, add new hotspots, or remove inactive ones.

    • Admins can generate performance reports, including network usage analytics and peak connection times.


5. Security Considerations

  • Encryption: The app should ensure secure authentication and data transmission using encryption (SSL/TLS).

  • Role-Based Access Control (RBAC): Different user roles (guest, free, premium) should have varying levels of access and capabilities.

  • Authentication: Support for multi-factor authentication (MFA) to improve security.

  • Session Timeout: Automatically disconnect users after a specified time of inactivity to prevent unauthorized access.


6. Conclusion

The Smart Public Wi-Fi Access Management App aims to provide an efficient, secure, and user-friendly experience for both users and administrators. By leveraging Object-Oriented Design principles, we can ensure scalability, modularity, and flexibility in managing Wi-Fi networks in public spaces. The design allows easy management of user sessions, devices, hotspots, and bandwidth allocation, while also providing insightful analytics to both end-users and administrators.

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About