Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kilochat #57

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
acfeca7
Time to get serious..
nielsenko Mar 9, 2023
9cf780b
Bump minSdkVersion to 19 on Android
nielsenko Jun 29, 2023
9aab00f
Minimize macos platform project
nielsenko Jun 29, 2023
6f2324c
Update README (wip)
nielsenko Jun 29, 2023
edca42c
WIP
nielsenko Jun 29, 2023
d5fdf0c
Do the async open dance
nielsenko Jun 30, 2023
24e8c93
Muse about model in README,md
nielsenko Jul 13, 2023
54eb7ef
Wrok-around set notification issue by converting to results - go_rout…
nielsenko Jul 13, 2023
83e1586
Use index, id for ordering
nielsenko Jul 13, 2023
06b396a
Add .gitignore
nielsenko Jul 29, 2023
75dc91d
Cleanup etc.
nielsenko Aug 3, 2023
36b5543
Multi-realm refactor (wip)
nielsenko Aug 4, 2023
b3365ef
Toasts working.. still needs a bit of love
nielsenko Aug 4, 2023
db9c454
Adaptive/responsive layout (wip)
nielsenko Aug 7, 2023
665b05b
Add mason brick to configure app service
nielsenko Aug 9, 2023
dca6b23
Router redirect, realm path, etc.
nielsenko Aug 9, 2023
3cdd268
Show current ConnectionState
nielsenko Aug 9, 2023
4023bb9
Cleanup imports
nielsenko Aug 9, 2023
ece6a4e
Markdown support, re-worked login (wip)
nielsenko Aug 9, 2023
d37a50d
Fix flutter warnings
nielsenko Aug 10, 2023
c2a262d
Simplify/reduce provider use (step 1)
nielsenko Aug 10, 2023
684e769
forgot to new realm_ui folder
nielsenko Aug 10, 2023
4c336c2
Move functionality into Repository class. Drop most providers
nielsenko Aug 10, 2023
2f75b9e
Better session status indication
nielsenko Aug 11, 2023
2c06320
Focus more functionality in Repository
nielsenko Aug 16, 2023
3a5e5fc
Set version to 0.1.0
nielsenko Aug 16, 2023
fd5de91
Update realm to 1.4.0 and flutter to 3.13.0.. and fix some broken stuff
nielsenko Aug 18, 2023
5da1d54
WIP
nielsenko Sep 5, 2023
c852ec8
Replace firebase auth with passkeys
nielsenko Sep 8, 2023
1ad04aa
Upgrade deps and fix compile errors
nielsenko Feb 22, 2024
ff95411
Brush off a bit
nielsenko Feb 23, 2024
e6ee6a4
Update mason brick
nielsenko Feb 24, 2024
7cd46aa
Update to latest realm and flutter
nielsenko May 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions kilochat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# Platform related. Generate platform-specific files with flutter create . --platforms <platform>
# Note that some files are force added for convenience for macos
android/
ios/
linux/
macos/
windows/
251 changes: 251 additions & 0 deletions kilochat/README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions kilochat/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

include: package:flutter_lints/flutter.yaml

linter:
rules:

analyzer:
plugins:
- custom_lint
72 changes: 72 additions & 0 deletions kilochat/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "com.example.kilochat"
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.kilochat"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 24 // bump to support passkeys
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
3 changes: 3 additions & 0 deletions kilochat/bricks/kilochat_appx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.1.0+1

- TODO: Describe initial release.
1 change: 1 addition & 0 deletions kilochat/bricks/kilochat_appx/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Add your license here.
27 changes: 27 additions & 0 deletions kilochat/bricks/kilochat_appx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# kilochat_appx

[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)

A new brick created with the Mason CLI.

_Generated by [mason][1] 🧱_

## Getting Started 🚀

This is a starting point for a new brick.
A few resources to get you started if this is your first brick template:

- [Official Mason Documentation][2]
- [Code generation with Mason Blog][3]
- [Very Good Livestream: Felix Angelov Demos Mason][4]
- [Flutter Package of the Week: Mason][5]
- [Observable Flutter: Building a Mason brick][6]
- [Meet Mason: Flutter Vikings 2022][7]

[1]: https://github.com/felangel/mason
[2]: https://docs.brickhub.dev
[3]: https://verygood.ventures/blog/code-generation-with-mason
[4]: https://youtu.be/G4PTjA6tpTU
[5]: https://youtu.be/qjA0JFiPMnQ
[6]: https://youtu.be/o8B1EfcUisw
[7]: https://youtu.be/LXhgiF5HiQg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"enabled": true,
"mongo_service_name": "{{service_name}}",
"database_name": "{{db_name}}",
"collection_name": "UserProfile",
"user_id_field": "ownerId"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"anon-user": {
"name": "anon-user",
"type": "anon-user",
"disabled": true
},
"api-key": {
"name": "api-key",
"type": "api-key",
"disabled": true
},
"custom-token": {
"name": "custom-token",
"type": "custom-token",
"config": {
"audience": [
"{{audience}}"
],
"jwkURI": "https://{{corbado_project_id}}.frontendapi.corbado.io/.well-known/jwks",
"requireAnyAudience": false,
"signingAlgorithm": "",
"useJWKURI": true
},
"secret_config": {
"signingKeys": []
},
"disabled": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "{{service_name}}",
"type": "mongodb-atlas",
"config": {
"clusterName": "{{cluster_name}}",
"readPreference": "primary",
"wireProtocolEnabled": false
},
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": {
"ref": "#/relationship/{{service_name}}/{{db_name}}/Channel",
"source_key": "parent",
"foreign_key": "_id",
"is_list": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"collection": "Channel",
"database": "{{db_name}}",
"roles": [
{
"name": "readAllWriteOwn",
"apply_when": {},
"document_filters": {
"write": {
"owner_id": "%%user.id"
},
"read": true
},
"read": true,
"write": true,
"insert": true,
"delete": true,
"search": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"properties": {
"_id": {
"bsonType": "objectId"
},
"count": {
"bsonType": "long"
},
"name": {
"bsonType": "string"
},
"owner_id": {
"bsonType": "string"
},
"parent": {
"bsonType": "objectId"
}
},
"required": [
"_id",
"count",
"name",
"owner_id"
],
"title": "Channel",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"channel": {
"ref": "#/relationship/{{service_name}}/{{db_name}}/Channel",
"source_key": "channel",
"foreign_key": "_id",
"is_list": false
},
"owner": {
"ref": "#/relationship/{{service_name}}/{{db_name}}/UserProfile",
"source_key": "owner",
"foreign_key": "_id",
"is_list": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"collection": "Message",
"database": "{{db_name}}",
"roles": [
{
"name": "readAllWriteOwn",
"apply_when": {},
"document_filters": {
"write": {
"owner_id": "%%user.id"
},
"read": true
},
"read": true,
"write": true,
"insert": true,
"delete": true,
"search": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"properties": {
"_id": {
"bsonType": "objectId"
},
"channel": {
"bsonType": "objectId"
},
"channel_id": {
"bsonType": "objectId"
},
"index": {
"bsonType": "long"
},
"owner": {
"bsonType": "string"
},
"owner_id": {
"bsonType": "string"
},
"text": {
"bsonType": "string"
}
},
"required": [
"_id",
"channel_id",
"index",
"owner_id",
"text"
],
"title": "Message",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"message": {
"ref": "#/relationship/{{service_name}}/{{db_name}}/Message",
"source_key": "message",
"foreign_key": "_id",
"is_list": false
},
"owner": {
"ref": "#/relationship/{{service_name}}/{{db_name}}/UserProfile",
"source_key": "owner",
"foreign_key": "_id",
"is_list": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"collection": "Reaction",
"database": "{{db_name}}",
"roles": [
{
"name": "readAllWriteOwn",
"apply_when": {},
"document_filters": {
"write": {
"owner_id": "%%user.id"
},
"read": true
},
"read": true,
"write": true,
"insert": true,
"delete": true,
"search": true
}
]
}
Loading