A collaborative social reading platorm.
The idea is for users to write next branches.
This way it is possible to create an infinite amount of alternative stories (a tree of possiblities).
Features
- login, signup and logout
- create, update and delete a tree
- create, update and delete a branch
- liking and bookmarking trees
- liking and bookmarking in branches
Screenshots
Firebase
Option 1 (Recommended)
Make sure to follow this guide to install Firebase CLI.
Follow this guide to generate Firebase Options then rename the generated file to lib\development_firebase_options.dart
for dev and/or lib\production_firebase_options.dart
for prod.
You'll have to run the cli twice to generate dev and prod.
Option 2
Create file lib\development_firebase_options.dart
for dev and/or lib\production_firebase_options.dart
for prod then copy the following config:
development_firebase_options.dart/production_firebase_options.dart
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
/// @nodoc
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
// ignore: missing_enum_constant_in_switch
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
}
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
/// @nodoc
static const FirebaseOptions web = FirebaseOptions(
apiKey: 'YOUR-WEB-API-KEY',
appId: 'YOUR-WEB-APP-ID',
messagingSenderId: 'YOUR-MESSAGING-SENDER-ID (same for all)',
projectId: 'YOUR-PROJECT-ID (same for all)',
authDomain: 'YOUR-AUTH-DOMAIN',
databaseURL: 'YOUR-DATABASE-URL (same for all)',
storageBucket: 'YOUR-STORAGE-BUCKET (same for all)',
measurementId: 'YOUR-MEASUREMENT-ID',
);
/// @nodoc
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'YOUR-ANDROID-API-KEY',
appId: 'YOUR-ANDROID-APP-ID',
messagingSenderId: 'YOUR-MESSAGING-SENDER-ID (same for all)',
projectId: 'YOUR-PROJECT-ID (same for all)',
databaseURL: 'YOUR-DATABASE-URL (same for all)',
storageBucket: 'YOUR-STORAGE-BUCKET (same for all)',
);
/// @nodoc
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'YOUR-IOS-API-KEY',
appId: 'YOUR-IOS-APP-ID',
messagingSenderId: 'YOUR-MESSAGING-SENDER-ID (same for all)',
projectId: 'YOUR-PROJECT-ID (same for all)',
databaseURL: 'YOUR-DATABASE-URL (same for all)',
storageBucket: 'YOUR-STORAGE-BUCKET (same for all)',
androidClientId: 'YOUR-ANDROID-CLIENT-ID',
iosClientId: 'YOUR-IOS-CLIENT-ID',
iosBundleId: 'YOUR-IOS-BUNDLE-ID',
);
}
Finally, in your Firebase project:
- enable email/password, Google and anonymous authentication
- copy
firestore.rules
content or create your own rules
For web
Create file web/index.html
and then copy the following code:
index.html
>
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<meta name="google-signin-client_id" content="YOUR GOOGLE CLIENT ID">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="wine">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<title>winetitle>
<link rel="manifest" href="manifest.json">
head>
<body>
<script>
var serviceWorkerVersion = null;
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
return;
}
scriptLoaded = true;
var scriptTag = document.createElement('script');
scriptTag.src = 'main.dart.js';
scriptTag.type = 'application/javascript';
document.body.append(scriptTag);
}
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
// Wait for registration to finish before dropping the