dinkelaker / flutter-chatapp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chatapp

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Backend configuration

Firebase database rule

These rules enable a simple protection of user specific data:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {

    // Only the user itself can change its own user data
		match /users/{uid} {
      allow write: if request.auth != null && request.auth.uid == uid;    
    }

		// All users can read other users
    match /users/{uid} {
      allow read: if request.auth != null;    
    }

		// Only authenticated user can read and create any documents in chats
		match /chats/{document=**} {
      allow read, create: if request.auth != null;
    }
  }
}

Firebase Storage rules

Only authenticated user may upload (create) and read files, but deleting or modifying files is not allowed:

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, create: if request.auth != null;
    }
  }
}

About


Languages

Language:Dart 94.5%Language:JavaScript 2.8%Language:Swift 1.9%Language:Kotlin 0.6%Language:Objective-C 0.2%