Privacy Policy
CS With Bari — O/A Level Computer Science LMS Effective Date: 7 October 2026 Last Updated: 7 October 2026
1. Introduction
Welcome to CS With Bari ("we", "us", "our", "the Platform"). CS With Bari is an online Learning Management System (LMS) operated by Sir Haseeb Bari Gilani, based in Lahore, Pakistan, and accessible at https://cswithbari.com. The Platform is purpose-built to deliver O-Level and A-Level Computer Science education to students across Pakistan and internationally.
This Privacy Policy describes, in detail, how we collect, use, store, disclose, and protect your personal data when you visit our website, create an account, enrol in courses, or otherwise interact with our services. It also explains the rights you have in relation to that data and how to exercise them.
By creating an account or using cswithbari.com, you acknowledge that you have read and understood this Privacy Policy. If you do not agree, please do not use the Platform.
This policy is written to meet the spirit and requirements of:
- The Pakistan Personal Data Protection Act (PDPA) and any regulations made thereunder;
- Good industry practice for educational technology platforms.
Scope of applicable law. CS With Bari operates from Lahore, Pakistan, and this policy is governed by Pakistani law only. The laws of Pakistan are the only data protection laws we apply. We do not claim that any non-Pakistani data protection regime applies to your use of the Platform, and nothing in this policy creates rights under the law of any other country.
Wherever the term "personal data" or "personal information" is used, it refers to any information that identifies, or can be used to identify, a natural person.
2. Information We Collect
We collect personal data in three ways: directly from you, automatically through your use of the Platform, and from third-party analytics services.
2.1 Information You Provide Directly
| Data Field | Description | Required |
|---|---|---|
| Full Name | Your first and last name, used to personalise your account and certificates | Yes |
| Email Address | Used for account creation, verification, login, and transactional communications | Yes |
| Password | Hashed with bcrypt (industry-standard adaptive hashing) before storage; the plaintext password is never retained | Yes |
| Phone Number | Optional contact detail; may be used for support or payment follow-up | No |
| Grade / Year | O-Level or A-Level year group; used to recommend appropriate courses | Yes |
| Payment Method | Mode of payment (bank transfer only); no raw card or cash transaction numbers are stored on our servers | Yes (at checkout) |
| AI Chat Inputs | Queries you submit to the on-platform AI assistant (powered by Google Gemini); stored per-user to maintain conversation context | When using AI |
2.2 Information Collected Automatically
| Data Field | Description | Source |
|---|---|---|
| Device ID | A persistent identifier tied to the device you register on the Platform, used to enforce per-student device access limits | Generated at login |
| Device Name | Human-readable name of your registered device (e.g., browser + OS string) | Generated at login |
| Session Tokens (JWT) | JSON Web Tokens stored in HttpOnly, Secure, SameSite=Lax cookies scoped to .cswithbari.com; used to authenticate your session without exposing tokens to JavaScript | NextAuth.js |
| IP Address | Captured per request for rate-limiting and fraud-prevention purposes; not stored permanently in user profiles | Web server / middleware |
| Streaming Tokens | Short-lived, cryptographically signed tokens issued for each video-stream request; stored in an HttpOnly cookie for the duration of the stream | Video CDN |
| Email Verification Codes | 6-digit codes generated via crypto.randomInt() and sent to your email address; stored temporarily until verified or expired | Auth system |
| Order Metadata | Order ID, total amount, coupon code, discount amount, final amount, payment status, and payment method, linked to your user account | Checkout system |
| Enrolment Records | Which courses and bundles you are enrolled in, and the enrolment date | LMS database |
| Live-Class Participation Data | For each class you join: the time you first connected, each time you disconnected, your accumulated time connected, and — for host oversight — whether your browser tab was hidden | LiveKit conferencing server |
| Class Chat Messages | Messages you post in a live-class chat, including host-pinned messages; visible to the host and other participants in that class | LiveKit conferencing server |
| Class Recordings | Where a class is configured as recordable, the screen share, camera feeds, and classroom audio captured for its duration | LiveKit egress, stored on Platform infrastructure |
| Parent–Child Links | Where you have a verified parent account, each verified link to a child, the child's registered email, and the 6-digit code used to verify it | Parent Portal |
2.3 Analytics and Tracking Data
| Data Field | Description | Provider |
|---|---|---|
| Page Views & Navigation Paths | Which public pages you visit and in what order | Google Analytics / Google Tag Manager |
| Device & Browser Metadata | Screen resolution, browser type, OS, and language preference | Google Analytics |
| Referral Source | The URL or search engine that directed you to cswithbari.com | Google Analytics |
| Session Duration & Engagement Metrics | Time spent on pages, click events, and scroll depth | Google Analytics |
Note: Google Analytics is only active on public-facing pages (landing, about, contact). It is not loaded on authenticated student dashboard pages, protecting your learning activity from third-party analytics.
3. How We Use Your Information
We use your personal data for the following specific purposes:
- Account Creation and Authentication — To create and manage your user account, verify your identity using a 6-digit email code, and maintain your authenticated session securely via NextAuth.js JWT tokens.
- Course Delivery — To grant you access to courses, lessons, and resources you have enrolled in, and to enforce content access controls (e.g., subscription status, device limits).
- Payment Processing and Order Management — To record and reconcile your orders, apply coupon discounts, update payment status, and issue payment receipts via email.
- Transactional Email Communications — To send you system-critical emails including: welcome messages, email verification codes, password-reset links, successful registration confirmations, enrolment confirmations, and payment receipts.
- AI-Assisted Learning — To pass your chat queries to the Google Gemini API and return AI-generated responses; your conversation history is stored to maintain contextual continuity within a session and across sessions.
- Security and Fraud Prevention — To enforce rate limits on sensitive endpoints (registration, login, email verification, and password reset), detect anomalous login patterns, and enforce device-limit controls.
- Platform Analytics and Improvement — To understand how users navigate public pages, which content resonates, and where usability improvements are needed, using aggregated and anonymised analytics data.
- Legal and Regulatory Compliance — To comply with applicable Pakistani law, respond to lawful requests from authorities, and enforce our Terms & Conditions.
- Support and Dispute Resolution — To respond to your support queries, resolve billing disputes, and investigate complaints.
- Soft Account Management — When you request account deletion, your record is soft-deleted (flagged as inactive) for a defined retention period before permanent removal, ensuring we can resolve any pending disputes.
4. Legal Basis for Processing
Under the Pakistan PDPA, we process personal data on the following bases:
| Purpose | Basis of Processing |
|---|---|
| Account creation, authentication, and course delivery | Performance of a contract — processing is necessary to deliver the service you subscribed to |
| Email verification and password-reset communications | Performance of a contract — necessary to secure your account |
| AI chat history storage | Legitimate interests — maintaining session context improves educational utility |
| Device registration and access-control enforcement | Legitimate interests — protecting copyrighted content and preventing credential sharing |
| Payment and order records | Performance of a contract and Legal obligation — financial record-keeping |
| Google Analytics on public pages | Consent — obtained where required |
| Compliance with Pakistani law enforcement requests | Legal obligation |
| Marketing communications (if any) | Consent — you may withdraw consent at any time |
We rely on your consent (given at registration), on contractual necessity, on compliance with Pakistani legal obligations, and on our legitimate business interests, in each case limited to the purposes disclosed in this Policy.
5. Cookies and Session Tokens
CS With Bari uses cookies and similar technologies to operate the Platform and maintain your authenticated session. The table below lists all cookies we set.
| Cookie Name | Type | Purpose | Duration | HttpOnly | Secure | SameSite |
|---|---|---|---|---|---|---|
__Secure-next-auth.session-token | Essential | Stores the encrypted JWT session token issued by NextAuth.js; authenticates every request to the dashboard and API | Session / configured session TTL | ✅ Yes | ✅ Yes | Lax |
__Host-next-auth.csrf-token | Essential | CSRF token used by NextAuth.js to validate state-changing form submissions | Session | ✅ Yes | ✅ Yes | Lax |
__Secure-next-auth.callback-url | Essential | Records the URL you were trying to visit before being redirected to the login page, then returns you there after authentication | Session | ✅ Yes | ✅ Yes | Lax |
stream_token | Essential | Short-lived, cryptographically signed cookie authorising a single HLS playback request; prevents direct URL scraping | 120 seconds | ✅ Yes | ✅ Yes | Lax |
_ga, _ga_<container-id> | Analytics | Google Analytics identifiers; distinguish unique visitors and sessions on public pages | 2 years | ❌ No | ✅ Yes | Lax |
_gid | Analytics | Distinguishes users within a single session | 24 hours | ❌ No | ✅ Yes | Lax |
_gat | Analytics | Throttles analytics request rates | 1 minute | ❌ No | ✅ Yes | Lax |
_gcl_au | Analytics | Google Tag Manager conversion/optimisation store | 90 days | ❌ No | ✅ Yes | Lax |
The Cookie Policy is the authoritative cookie inventory; see /legal/cookies.
All essential cookies are strictly necessary for the Platform to function and cannot be disabled without breaking core functionality. Analytics cookies are only loaded on public pages and, where legally required, subject to your consent.
All cookies are scoped to the .cswithbari.com domain, ensuring they are not transmitted to unrelated websites.
6. Data Storage and Security
6.1 Infrastructure
Your personal data is stored in a MySQL/MariaDB relational database hosted on servers in Pakistan. Video content is served via a token-gated HTTPS streaming pipeline; no direct public URLs exist for any video asset.
6.2 Security Measures
We implement a defence-in-depth security model:
| Control | Implementation |
|---|---|
| Password Hashing | All passwords are hashed with bcrypt (adaptive cost factor) before storage; plaintext passwords are never persisted or logged |
| Transport Encryption | All data in transit is encrypted with TLS 1.2 / 1.3 (HTTPS); HTTP requests are redirected to HTTPS |
| HTTP Security Headers | In production: Content-Security-Policy, Strict-Transport-Security (HSTS), X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, Permissions-Policy |
| Session Security | JWT session tokens stored only in HttpOnly, Secure, SameSite=Lax cookies; tokens are never exposed to JavaScript |
| Video Stream Protection | Video files are served via cryptographically signed, short-lived tokens; byte-range requests are validated server-side |
| Rate Limiting | In-memory sliding-window rate limiting on sensitive endpoints: Registration (5 attempts/hour), Login (10 attempts/15 minutes per IP), Email Verification (10 attempts/15 minutes), Forgot Password (3 attempts/hour) |
| Email Verification Codes | 6-digit codes generated via crypto.randomInt() (cryptographically secure); codes expire after a short validity window |
| Device Access Enforcement | Each student account is tied to a registered device (device_id, device_name); access from unregistered devices is blocked at the API layer |
| CSRF Protection | NextAuth.js CSRF token mechanism applied to all authentication form submissions |
| Soft Deletion | Deleted accounts are flagged inactive rather than immediately purged, protecting against accidental data loss and allowing dispute resolution |
6.3 Data Breach Response
In the event of a data breach that is likely to result in a risk to you, we will notify you and, where required, the relevant authority in Pakistan, within the timeframes required by Pakistani law.
7. Data Retention
We retain your personal data only as long as necessary for the purposes described in this Policy or as required by law.
| Data Category | Retention Period | Reason |
|---|---|---|
| Active user account (name, email, grade, role) | For the lifetime of your active account | Service delivery |
| Password hash | For the lifetime of your active account | Authentication |
| Soft-deleted user account | 90 days after deletion request | Dispute resolution; then permanently purged |
| Email verification codes | Until verified or 24 hours (whichever is first) | Authentication security |
| Password-reset tokens | Until used or 1 hour (whichever is first) | Security |
| Session tokens (JWT) | Rolling 30-day inactivity window; revoked on logout | Active session |
| Stream tokens | Minutes (per-stream lifetime) | Content protection |
| Order records | 7 years | Financial / legal compliance under Pakistani law |
| Enrolment records | 5 years after last active enrolment | Educational record; dispute resolution |
| Live-class attendance records | For the lifetime of your account; 5 years after your last attended class | Educational record; dispute resolution |
| Class recordings | For as long as the class remains on the Platform; deleted when the class or the course is removed | Student revision |
| Parent–child links | For the lifetime of the parent account; removed immediately if a parent unlinks a child | Service delivery; link verification |
| Device registration records | For the lifetime of your active account; purged with account | Access control |
| AI chat history | For the lifetime of your active account; deleted on account deletion | Contextual continuity |
| Rate-limit counters (IP-based) | Maximum 1 hour (in-memory; resets on server restart) | Transient security control |
| Google Analytics data | Up to 26 months (Google's default retention) | Analytics |
| Transactional email logs | 90 days | Delivery verification; support |
8. Sharing and Disclosure
We do not sell, rent, or trade your personal data. We share data only in the circumstances described below.
8.1 Third-Party Service Providers
| Third Party | Data Shared | Purpose | Data Location | Privacy Reference |
|---|---|---|---|---|
| Amazon Web Services Simple Email Service (AWS SES) | Your email address, your name, email body content (verification code, receipt details, etc.) | Sending transactional emails from noreply@cswithbari.com | AWS (regional; closest available) | AWS Privacy Notice |
| Google Analytics / Google Tag Manager | Anonymised browsing data, device metadata, IP address (anonymised by Google) | Public-page usage analytics | Google servers (US and global) | Google Privacy Policy |
| Google Gemini API | Your AI chat query text | Generating AI-powered responses in the CS With Bari AI assistant | Google servers | Google Cloud Privacy Notice |
| MySQL/MariaDB hosting provider | All structured personal data | Database persistence | Pakistan (primary) | Covered by our server hosting agreement |
| LiveKit (self-hosted by us) | Your name and participant identity, camera and microphone streams, screen share, in-class chat messages, room access tokens, and class recordings | Delivering live classes and, where a class is configured as recordable, recording it | Our own infrastructure (Pakistan), on live.cswithbari.com | No data is sent to LiveKit's hosted cloud |
8.2 Legal Disclosure
We may disclose personal data to law enforcement agencies, courts, or government authorities without prior notice if we are required to do so by:
- A valid court order, subpoena, or legal process;
- Pakistani law or any applicable foreign law;
- The need to protect the safety of any person, or the security of our Platform.
We will, where permitted by law, attempt to notify you before disclosing your data.
8.3 Business Transfers
In the event of a merger, acquisition, or sale of all or a material portion of our assets, your personal data may be transferred to the successor entity. We will notify you via email and/or a prominent notice on the Platform at least 30 days before your data becomes subject to a materially different privacy policy.
8.4 Aggregated / Anonymised Data
We may share aggregated, de-identified statistical data (e.g., "X% of students completed A-Level Paper 4 module") that cannot reasonably be used to identify any individual, without restriction.
8.5 Disclosure to a Verified Parent
A verified parent account can see information about the specific children linked to it. A link is only ever created after the child confirms a 6-digit code sent to their own registered email, so we never attach an adult to a child's record unilaterally, and we never disclose that code to anyone else.
Once a link is verified, the parent can see, for that child only:
- assessment results — score, total marks, percentage, letter grade, remarks, grading date, and any instructor feedback and annotations, exactly as graded;
- live-class attendance — which classes the child was assigned to, whether each was attended or missed, how long they were connected, and a monthly summary;
- items the child is enrolled in, with progress where tracked;
- the child's orders — status, items, amounts, and history; and
- platform alerts and recent activity for that child.
A parent cannot see any other student's data, the child's password, payment card details (none are stored), AI Assistant conversations, or any administrative tooling. Attendance is recorded and parent-visible even where the child joined through a share link rather than a group.
Parent Portal visibility is read-only. It does not alter, re-grade, or reopen a result, and it does not amend an attendance record. If you believe a result or attendance record is wrong, please contact us rather than raising it with another parent or an instructor.
A parent's own name, email, and phone number are used to administer the parent account and — where they have opted in — to send attendance and assessment notifications. Each notification category can be switched on or off in the Portal, and we honour that choice. Removing a child from a parent account deletes only the link: it does not delete the parent's account, nor the child's account, results, or enrolment. To have a parent account deleted, contact us.
9. Device Access Control
To protect the integrity of paid course content and prevent credential sharing, CS With Bari enforces a device registration policy:
- When you log in for the first time on a new device, that device's identifier (
device_id) and descriptive name (device_name) are recorded and associated with your account. - Access from an unregistered or over-limit device may be blocked.
- You may contact support at cswithbari@gmail.com to request removal of a stale device registration.
The device_id and device_name are used solely for access-control purposes and are not shared with any third party. This data is retained for the lifetime of your account and deleted when your account is permanently purged.
10. Children's Privacy
CS With Bari is designed for students typically aged 14 to 19 years, studying O-Level and A-Level Computer Science.
- We do not knowingly collect personal data from children under the age of 13.
- For students aged 13 to 17, we strongly recommend that a parent or legal guardian reviews this Privacy Policy and the Platform's Terms & Conditions before the student creates an account.
- Where the PDPA requires verifiable parental consent for minors, we rely on the parent or guardian who completes the registration or payment process to provide that consent on behalf of the minor.
- If you are a parent or guardian and believe your child has provided us with personal data without your consent, please contact us at cswithbari@gmail.com and we will promptly delete the relevant data.
11. Your Rights
Depending on your jurisdiction, you have the following rights in relation to your personal data. To exercise any of these rights, please contact us at cswithbari@gmail.com.
| Right | Description | How to Exercise |
|---|---|---|
| Right of Access | Request a copy of the personal data we hold about you | Email cswithbari@gmail.com with subject "Data Access Request" |
| Right to Correction / Rectification | Request that inaccurate or incomplete data be corrected | Update in your Account Settings, or email us |
| Right to Erasure ("Right to Be Forgotten") | Request deletion of your personal data, subject to legal retention obligations | Email cswithbari@gmail.com with subject "Account Deletion Request" |
| Right to Data Portability | Receive your personal data in a structured, machine-readable format (e.g., JSON or CSV) | Email cswithbari@gmail.com with subject "Data Portability Request" |
| Right to Withdraw Consent | Where processing is based on consent (e.g., marketing emails, analytics cookies), withdraw that consent at any time | Unsubscribe link in emails; cookie settings on the website |
| Right to Object | Object to processing based on legitimate interests, including direct marketing | Email cswithbari@gmail.com |
| Right to Restrict Processing | Request that we restrict processing of your data in certain circumstances (e.g., while a dispute is investigated) | Email cswithbari@gmail.com |
| Right to Lodge a Complaint | Lodge a complaint with the relevant data protection supervisory authority | Pakistan: Personal Data Protection Authority (PDPA) |
We will respond to all verifiable requests within 30 days. In complex cases, we may extend this by a further 60 days, in which case we will notify you within the initial 30-day period.
We may need to verify your identity before processing a request to protect against fraudulent submissions.
12. International Data Transfers
CS With Bari is headquartered in Lahore, Pakistan. Your data is primarily stored on servers in Pakistan. However, some of our third-party service providers (including AWS SES, Google Analytics, and Google Gemini) operate on servers located in other countries.
Because those providers process your data outside Pakistan, we put appropriate contractual safeguards in place before any such transfer, including:
- Processor agreements with third parties (e.g., AWS Data Processing Agreement, Google Cloud Data Processing Addendum) that include appropriate technical and organisational measures;
- Access and confidentiality commitments limiting the provider's use of your data to delivering the service we have contracted from them;
- Encryption of data in transit wherever the provider supports it.
By using CS With Bari, you acknowledge that your data may be transferred to, stored in, and processed in countries outside Pakistan that may have different data protection standards than Pakistan.
13. Changes to This Policy
We may update this Privacy Policy from time to time to reflect changes in our practices, technology, legal requirements, or for other operational reasons. When we make material changes, we will:
- Update the "Last Updated" date at the top of this document;
- Post a notice on the Platform's homepage or dashboard;
- Send an email notification to the address registered on your account, where the changes are significant.
Your continued use of the Platform after the effective date of the revised Policy constitutes your acceptance of the updated terms. If you do not agree to the revised Policy, please stop using the Platform and contact us to delete your account.
14. Contact Us
If you have any questions, concerns, or requests regarding this Privacy Policy or your personal data, please contact us through any of the following channels:
| Method | Details |
|---|---|
| Email (Privacy Enquiries) | cswithbari@gmail.com |
| General Email | cswithbari@gmail.com |
| Website | https://cswithbari.com/contact |
| Instructor | Sir Haseeb Bari Gilani |
| Location | Lahore, Punjab, Pakistan |
| No-Reply / Transactional Emails | noreply@cswithbari.com (do not reply to this address) |
We are committed to working with you to resolve any privacy concerns promptly and fairly. If you are not satisfied with our response, you have the right to escalate to the relevant supervisory authority in Pakistan.
This Privacy Policy was prepared specifically for CS With Bari (cswithbari.com) and reflects the actual technical architecture and data-processing practices of the Platform as of the Effective Date stated above. It is not a generic template.
© 2026 CS With Bari — Sir Haseeb Bari Gilani. All rights reserved.