e-School Saas

Documentation

By : WRTeam
Email : wrteam.priyansh@gmail.com

Thank you for purchasing e-School Saas. We appreciate your support. In this documentation, you will find instructions on how to set up the admin panel and mobile application for e-School Saas. This document also provides features of e-School Saas. If you have any questions, feel free to reach out. Thank you for choosing e-School Saas!


To find your Purchase code you can visit this link: Where is My Purchase code?

VPS Server Setup


Initial Server Configuration

Before installing e-School Saas, you need to properly configure your VPS server. Follow these detailed steps to set up your server environment:


1. Server Requirements


  • Laravel Framework 10.0: Ensure your server supports Laravel 10.0, which requires PHP version 8.1.0 or higher for optimal performance.
  • VPS Server for Multi-Tenancy Database: A Virtual Private Server (VPS) is needed to handle multiple databases efficiently, with each school having a separate database.
  • KVM-2 VPS or Higher: Recommended for better performance with dedicated resources.
  • Operating System: Ubuntu latest version (clean installation, without control panels)
  • RAM: Minimum 4GB (8GB recommended for better performance)
  • Storage: 80GB SSD (expandable based on data storage needs)
  • CPU: 2 vCores minimum (4 cores recommended)
  • Bandwidth: At least 1TB monthly
  • Database Root User or Necessary Permissions: Full root access or adequate privileges are required to create, modify, and delete databases dynamically as part of your multi-tenancy architecture.
  • Max Upload Size: Set a high enough upload size limit (e.g., 50MB+) to allow for larger file uploads (Required only for updating new version).
  • Max Execution Time & Max Input Time: Adjust the maximum execution time to avoid script timeouts during large operations like creating school databases, database imports, backups, or processing (recommended: 5000 seconds or more).
  • WebSocket Server: Required for real-time chat functionality.
  • Ports and Firewall Configuration: Ensure the necessary ports are open and properly configured in your server's firewall for WebSocket communication.

Setup Option 1: Manual Server Configuration



1. Update System Packages


First, update your system packages to ensure you have the latest security updates and package versions:

sudo apt update
sudo apt upgrade -y

2. Install Essential Software


Install required tools and utilities:

sudo apt install -y curl wget unzip git software-properties-common

3. Install PHP 8.3 and Required Extensions


sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php8.3 php8.3-cli php8.3-common php8.3-fpm
sudo apt install -y php8.3-mysql php8.3-zip php8.3-gd php8.3-mbstring
sudo apt install -y php8.3-curl php8.3-xml php8.3-bcmath php8.3-intl
sudo apt install -y php8.3-imap php8.3-opcache php8.3-soap php8.3-redis
sudo apt install -y php8.3-fileinfo

4. Install Nginx Web Server


sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx

5. Install MySQL Database Server


sudo apt install -y mysql-server
sudo systemctl enable mysql
sudo systemctl start mysql

Secure your MySQL installation:

sudo mysql_secure_installation

6. Configure MySQL for e-School Saas


Create a database user with root privileges (required for multi-tenancy):

sudo mysql -u root -p

At the MySQL prompt, run:

CREATE USER 'eschool_admin'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON *.* TO 'eschool_admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;


7. Configure PHP Settings


Edit the PHP configuration file to optimize it for e-School Saas:

sudo nano /etc/php/8.3/fpm/php.ini

Find and modify these settings:

memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 5000
max_input_time = 5000
max_file_uploads = 50

Save the file and restart PHP-FPM:

sudo systemctl restart php8.3-fpm

8. Configure Nginx for e-School Saas


Create a new Nginx server block configuration:

sudo nano /etc/nginx/sites-available/eschool

Add the following configuration (replace yourdomain.com with your domain):

server {
    listen 80;
    server_name yourdomain.com *.yourdomain.com;
    root /var/www/html/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php index.html;
    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Enable the configuration and restart Nginx:

sudo ln -s /etc/nginx/sites-available/eschool /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

9. Install SSL Certificate (Recommended)


Install Certbot for free SSL certificates:

sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com -d *.yourdomain.com

10. Set Up WebSocket Server for Chat


Install Supervisor to manage the WebSocket process:

sudo apt install -y supervisor

Create a configuration file for the WebSocket server:

sudo nano /etc/supervisor/conf.d/websocket.conf

Add the following configuration (replace /your_root_folder_path/ with your actual path):

[program:websocket]
process_name=websocket
command=/usr/bin/php /your_root_folder_path/artisan websocket:init
autostart=true
autorestart=true
user=www-data
redirect_stderr=true
stdout_logfile=/your_root_folder_path/storage/logs/websocket.log
stderr_logfile=/your_root_folder_path/storage/logs/websocket.log

Reload and update Supervisor configuration:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status

11. Configure Firewall


Install and configure UFW (Uncomplicated Firewall):

sudo apt install -y ufw
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8090/tcp  # For WebSocket Server
sudo ufw enable

12. Create Web Directory


Create the web directory and set proper permissions:

sudo mkdir -p /var/www/html
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html

Setup Option 2: Using aaPanel (Recommended)


aaPanel is a lightweight and powerful server management tool that makes it easier to configure and manage your server for e-School Saas.


1. Install aaPanel


First, login to your server terminal using SSH:

ssh root@your-server-ip

Once logged in, run the following command to download and install aaPanel:

URL=https://www.aapanel.com/script/install_7.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_7.0_en.sh "$URL";fi;bash install_7.0_en.sh aapanel

After installation completes, you'll receive the aaPanel credentials including URL, username, and password. Save these details for login.


2. Install Required Software via aaPanel


Log in to aaPanel using the provided URL and credentials, then install:

  • Web server (Nginx or Apache recommended)
  • MySQL
  • PHP 8.3
  • phpMyAdmin

e-School Saas


3. Configure PHP Extensions and Settings


In aaPanel, navigate to PHP Settings and install these extensions:

  • fileinfo
  • mbstring

e-School Saas

Then go to PHP Configuration and set these values:

  • max_execution_time = 5000
  • max_input_time = 5000
  • post_max_size = 50M
  • upload_max_filesize = 50M
  • max_file_uploads = 50
e-School Saas

Go to PHP Disabled Functions and remove "symlink" from the list.

Restart PHP services after making these changes.

e-School Saas

4. Add Website in aaPanel


Go to the Websites section and click on Add Site:

  • Enter your domain name
  • Select MySQL for the database section
  • Select PHP 8.3
  • Submit to create the website
e-School Saas

e-School Saas

5. Add Wildcard Domain


After adding the main domain, go to the domain configuration and add a wildcard domain with the format: *.your_domain_name

e-School Saas

e-School Saas

e-School Saas

6. Configure DNS


Add DNS A records for your domain:

  • Type: A
  • Name : * (*.domain.com)
  • Name : *.subdomain (*.subdomain.domain.com)
  • Point To : Your server IP

7. Add SSL Certificate


Add SSL certificates for both your main domain and wildcard domain using Let's Encrypt DNS verification.

e-School Saas


8. Upload Source Code


Upload your source code to the domain directory and ensure the web path points to the public directory.

e-School Saas


9. Get MySQL Root Credentials


To get MySQL root credentials, run this command in the terminal:

sudo cat /root/.my.cnf
e-School Saas


10. Set Up WebSocket


Install Supervisor:

sudo apt update
sudo apt install supervisor

Create a configuration file for the WebSocket server:

sudo nano /etc/supervisor/conf.d/websocket.conf

Add the following content (replace /your_root_folder_path/ with your actual path):

[program:websocket]
process_name=websocket
command=/usr/bin/php /your_root_folder_path/artisan websocket:init
autostart=true
autorestart=true
user=www-data
redirect_stderr=true
stdout_logfile=/your_root_folder_path/storage/logs/websocket.log
stderr_logfile=/your_root_folder_path/storage/logs/websocket.log

Update Supervisor:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status

Enable port 8090 in your firewall for WebSocket communication. Your WebSocket URL will be:

ws://your_server_ip:8090

Now your server is ready for the e-School Saas installation. Proceed to the next section to install the application.

Installation Steps


1. Installation Screen

e-School Saas

2. Server Requirements & Extensions

If PHP version is lower than 8.0 or any extension is not installed then it will be highlighted using Red color. So you need to make sure that your server meets the all requirement.

e-School Saas

3. Permission Screen

Make sure this folder have read & write permissions. If not then assign this folders read & write permissions.

e-School Saas

4. Database Configuration Screen

e-School Saas

5. Database Connection Status

e-School Saas

6. Final installation Screen

If everything is configured successfully then your Admin panel has been installed successfully.You can login as Super Admin using the credentials provided here.

e-School Saas

Addtional Configurations (Admin Panel)


After Installation you need to setup some settings before using the system.

1. Session Year

Set your Current & upcoming session years here, So you can manage studens by session year

e-School Saas

2. App Settings

This settings will be used by your Flutter APP.

e-School Saas

3. General Settings

This settings will be used by Admin Panel.You can set your current session year here.

e-School Saas

4. FCM Settings



Need to enter Firebase project id and Firebase service file.

e-School Saas

You can get firebase project id and service file as shown in the images.


e-School Saas

e-School Saas

5. Email Configurations

Send Email configurations so that system can send emails to registered users.

e-School Saas

6. Fee payment Configurations

Stripe credentials. At a time only one payment gateway will be enable

e-School Saas

7. Payment Gateway's Webhook Configration

2. Webhook Configration for Stripe

e-School Saas e-School Saas e-School Saas e-School Saas

8.Google reCAPTCHA Configurations

Set the API keys as shown in the image. You can get the API keys from here https://www.google.com/recaptcha/admin/create

e-School Saas


Setup flutter


Setup flutter in your system

    Visit flutter official website : https://docs.flutter.dev/get-started/install for full install guide.

    If you prefer video tutorials, we recommend this playlist for the full installation process
    https://www.youtube.com/playlist?list=PLSzsOkUDsvdtl3Pw48-R8lcK2oYkk40cm

Change package name


  1. Unzip the downloaded code. After unzipping you will have e-School Saas - Flutter Code zip folder. Unzip that folder and open it in Android Studio or Visual Studio Code.
  2. Open ide terminal go to your project path and execute command

    flutter pub get

  3. If you are running this app for ios then run these following commands in terminal.

    cd ios

    pod install

    cd ..

  4. Change package name of android app
    Execute this command in your terminal

    flutter pub run change_app_package_name:main your_new_package_name


    e-School Saas

  5. Change package name of ios app
    Open ios folder of this project in xcode. Go Select Runner->Targets->General->Identity and enter new package name in Build Identifier.

    e-School Saas

Integrate with firebase


  1. Create firebase project in your account


    e-School Saas

    e-School Saas

    e-School Saas

    e-School Saas

  2. To setup the firebase in your flutter app, please follow the steps given in the following link. https://firebase.google.com/docs/flutter/setup

  3. To setup notificaiton settings in ios, please follow the steps given in the following link. https://firebase.flutter.dev/docs/messaging/apple-integration

Integrate with admin panel


Go to lib/utils/constants.dart and replace the baseUrl with your admin panel url. Set your socket url as well.



e-School Saas

Change app name


For Android, go to android/app/src/main/AndroidManifest.xml and change the app name as shown in image. Replace the selected eschool text with your school name



e-School Saas

For IOS open this project in xcode and enter your app name in display name field as shown in image.



e-School Saas

Run this app


Open your terminal, navigate to your project path and execute the following command to run this app.


flutter run


Go to README.md file to check all the commonly used commands to fix issues that you may encounter while running the app. You'll also be able to run the shell script directly if you're using Android Studio.


e-School Saas

Change app theme


Go to lib/ui/styles/colors.dart and set your theme colors


e-School Saas

Change font in app


  1. Go to lib/app/app.dart and add your font as shown in image.



    e-School Saas

  2. Go to assets/google_fonts/ and add .tff files of fonts.



    e-School Saas

Change language in app


  1. By default,default applicaiton language is english. If you want to change default language go to lib/utils/appLanguages.dart and add your respective language's code shown in below image. Get your language code from here https://developers.google.com/admin-sdk/directory/v1/languages.



    e-School Saas

  2. If your default language code is not in app language list add language details in list as shown in below image. Go to lib/utils/appLanguages.dart



    e-School Saas

  3. If your default language is not in assets/languages/[language-code].json then create new file in same folder with [language-code].json. Add all the labels from en.json and convert label values in your respective language



    e-School Saas

  4. Copy all the labels form en.json file in your [language-code].json file.



    e-School Saas

  5. If you want to add new language then follow the steps 2,3 and 4.

Change item animations


In the lib/utils/constants.dart file, to enable/disable item appearing animations, you can change the value of isApplicationItemAnimationOn to true/false according to your requirements.

To change the duration of animation you can adjust the milliseconds of different animations by increasing/decreasing the values of the duration variables.



e-School Saas

Generate release version


Create and add Key Store file for Androd:



  1. To generate a keystore file, run the following command:


    keytool -genkey -v -keystore your-keystore-file.jks -keyalg RSA -keysize 2048 -validity 10000 -alias your-alias

    You can replace "your-keystore-file.jks" with your preferred filename, but ensure you keep the ".jks" extension. Similarly, you can change "your-alias" as needed, but make sure to remember it. During this process, you will be prompted to set a password; please note that the password characters won't be visible on the screen.

    Additional information may be requested, but you can simply press Enter to skip those as they are optional fields.



  2. Create a file named "key.properties" in your project's "android" folder and add the following details, which correspond to the information you used in the previous step:


    storePassword=[your-password-from-previous-step]
    keyPassword=[your-password-from-previous-step]
    keyAlias=[your-alias-from-previous-step]
    storeFile=[your-keystore-file-location]


    Replace the placeholders ("[]" brackets) with the actual details you used. Once these two steps are completed, you can generate either an APK file using the following command:


    flutter build apk

    Or an app bundle file for the Play Store upload with:


    flutter build appbundle


e-School Saas



Follow these links for more information on generateing the release version:



  1. To generate release android app-bundle and publish to playstore follow https://flutter.dev/docs/deployment/android



  2. To generate release ios apk and publish to appstore follow https://flutter.dev/docs/deployment/ios

Scope of Staff Teacher App


Accessibility of Teacher

  • View Timetable
  • Add and view attendance
  • Add and view attendance
  • Manage lesson, topics, manage class announcements and assignment
  • Manage exam result
  • Manage leaves
  • View payrolls
  • Edit profile and change password

Accessibility of Staff/Admin

  • View classes and session years
  • View and manage leaves
  • View student attendance
  • View class and teacher timetable
  • View exam and exam results
  • Manage notifications and announcements
  • Manage payrolls
  • View paid fees
  • Edit profile and change password

How to get Socket URL


Install Supervisor



e-School Saas

Supervisor settings



e-School Saas

Your Socket URL



e-School Saas


ws://YOUR-SERVER-IP:8090



Setup websocket using terminal


Open the Terminal from an SSH Connection.

sudo apt-get update
sudo apt-get install supervisor
sudo nano /etc/supervisor/conf.d/your-laravel-websockets.conf


[program:laravel-websockets]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/your/laravel/artisan websocket:init
autostart=true
autorestart=true
user=username
numprocs=1
redirect_stderr=true
stdout_logfile=/path/to/your/laravel/storage/logs/laravel-websockets.log


sudo supervisorctl reread
sudo supervisorctl update


sudo supervisorctl start laravel-websockets

sudo supervisorctl status
You should see something like:
laravel-websockets RUNNING pid 12345, uptime 0:03:21

Your Socket URL

ws://YOUR-SERVER-IP:8090


How to setup Custom Domain


Domain Type



e-School Saas
e-School Saas

When creating a school, the admin has the option to specify the domain type for the school's website and also school can choose the domain type from General Settings Sections. They can choose between two domain types:

Default Domain: This is a predefined domain provided by the system (e.g., schoolname.yoursystemdomain.com). It is automatically set up and requires no additional configuration from the admin.

Custom Domain: If the school has its own domain, the admin can enter it during the setup process and also school can setup it from general settings. However, before using a custom domain, it must be properly configured to point to the server's IP address where the system is hosted. Once the domain's DNS settings are correctly updated and verified, the custom domain can be used as the school's official website address.

Set Custom Domain on Server


e-School Saas

Steps for Super Admin


  1. Add Custom Domain to VPS:
    1. Log into the VPS server.
    2. Configure the custom domain to work with the VPS server (e.g., by creating a virtual host).
  2. Enable SSL:
    1. Install and enable SSL for the custom domain using tools like Let's Encrypt or a paid SSL certificate.

Steps for School Admin


  1. Get Vps Server Ip Address:
    1. Ensure the VPS server's IP address is visible to the School Admin in the "General Settings" section when they select the "Custom Domain" options.
  2. Update DNS Settings:
    1. Log into your domain provider's dashboard.
    2. Add a DNS record (usually an A record) pointing the custom domain to the VPS server's IP address.
  3. Wait for Propagation:
    1. DNS changes may take a few minutes to a few hours to propagate.

Support


Its our pleasure to serve and support our customers. Please contact our support team if you encounter any issues or have any questions related to e-School Saas.


Customer Support Head for e-School Saas : Bhavik WRTeam


To help our customers, we constantly be in touch with every customer if they need any assistance regarding our product.
We offer our customers a support from Mon – Fri 9.00am to 6.00pm IST (GMT +5.30) – We are a Team located in India – Asia. Typically we reply our customers for all the questions and queries within 24 hours of time via comments, support forum or emails.

Rating


Your Feedback


Dear valuable customer, Thank you very much for choosing our product. It's our pleasure to serve top-notch service to you. Please give us your honest feedback that will help us to make a more strong and reliable product by click here Rate Us. Thank you very much.

Contact Us


WRTeam has creative and dedicated group of developers who are mastered in Apps Developments and Web Application Development with a niche in delivering quality solutions to customers across the globe. Contact us today to find out how we can help you or for freelance work.

Visit Us : https://wrteam.in

Mail Us : support@wrteam.in


Thank you very much.