leaveGroup(String groupID) async {
114 | if (s5messenger == null) return;
115 | s5messenger!.leaveGroup(s5messenger!.group(groupID));
116 | loadGroups();
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {"images":[{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@2x.png","scale":"2x","platform":"ios"},{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@3x.png","scale":"3x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@2x.png","scale":"2x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@3x.png","scale":"3x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@2x.png","scale":"2x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@3x.png","scale":"3x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@2x.png","scale":"2x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@3x.png","scale":"3x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@2x.png","scale":"2x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@3x.png","scale":"3x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@2x.png","scale":"2x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@3x.png","scale":"3x","platform":"ios"},{"size":"68x68","idiom":"universal","filename":"Icon-App-68x68@2x.png","scale":"2x","platform":"ios"},{"size":"76x76","idiom":"universal","filename":"Icon-App-76x76@2x.png","scale":"2x","platform":"ios"},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x","platform":"ios"},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-1024x1024@1x.png","scale":"1x","platform":"ios"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"},{"size":"20x20","idiom":"universal","filename":"Icon-App-Tinted-20x20@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"20x20","idiom":"universal","filename":"Icon-App-Tinted-20x20@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Tinted-29x29@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Tinted-29x29@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Tinted-38x38@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Tinted-38x38@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Tinted-40x40@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Tinted-40x40@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Tinted-60x60@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Tinted-60x60@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Tinted-64x64@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Tinted-64x64@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"68x68","idiom":"universal","filename":"Icon-App-Tinted-68x68@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"76x76","idiom":"universal","filename":"Icon-App-Tinted-76x76@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-Tinted-83.5x83.5@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-Tinted-1024x1024@1x.png","scale":"1x","platform":"ios","appearances":[{"appearance":"luminosity","value":"tinted"}]}],"info":{"version":1,"author":"xcode"}}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > ⚠️Luogo is beta software! I've done my best to build a functional app, but if you run into any issues please file an [issue](https://github.com/lukehmcc/luogo/issues).
2 |
3 | # Luogo
4 |
5 | *A Simple & Secure Group Location Sharing App*
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | 
32 |
33 | **Luogo** is a cross-platform mobile app that allows groups of people to easily share their location without it [being sold](https://www.theverge.com/2021/12/9/22820381/tile-life360-location-tracking-data-privacy). Fully open source, writing in dart & rust, and utilizing modern MLS & encryption tech. You no longer have to trust a large corporatoin with your data.
34 |
35 | ---
36 |
37 | ## Features
38 |
39 | - **Cross Compatible:** No more worrying about walled gardens. All of your friends can join regardless of platform. (iOS/Android)
40 |
41 | - **Batteries Included:** No configuration required to get started. (Though you still can configure your [S5 Node](https://s5.pro/) if you wish).
42 |
43 | - **MLS:** Utilizes [modern encryption](https://github.com/openmls/openmls) to make sure no one can read your location data unless you want them to.
44 |
45 | - **Groups:** Granular group sharing so you can control who knows where you are.
46 |
47 | - **One Time Send:** If you just want someone to have your location once, just send it with the one time button! No need to constantly send updates.
48 |
49 | ## Getting Started
50 |
51 | **In Beta Period**: For now the best way to try the app is to go to the [Releases](https://github.com/lukehmcc/luogo/releases) page and download the Android APK file. This will be updated when the app gets pushed to the App/Play Stores.
52 |
53 | ### Development
54 |
55 | To get started with local development do the following:
56 |
57 | ```bash
58 | git clone --recursive https://github.com/lukehmcc/luogo.git # make sure to recuse submodules
59 | # If you forgot to recurse and already cloned you can do this
60 | # git submodule init && git submodule update
61 | cd luogo/
62 | ./flutterw run --flavor dev # Make sure to run with the flutter wrapper so everyone is on the same flutter version
63 | ```
64 |
65 | To build a production apk:
66 |
67 | ```bash
68 | ./flutterw build appbundle --flavor prod
69 | ```
70 |
71 | Feel free to [submit an issue](https://github.com/lukehmcc/luogo/issues) or [PR](https://github.com/lukehmcc/luogo/pulls) if you run into any issues. I'm here to collaborate and make the best app possible!
72 |
73 | ## Architecture
74 |
75 | **Backend:** Utilizes the [s5_messenger](https://github.com/s5-dev/s5_messenger) library to handle messaging between users. The users location is grabed from the [geolocator](https://pub.dev/packages/geolocator), parsed into a [message format](https://github.com/s5-dev/s5_messenger/blob/main/lib/src/mls5/model/message.dart), then s5_messenger uses [openmls](https://crates.io/crates/openmls) to create the message in the respecitve group, and this message is relayed through the s5 network via a [streams message](https://docs.s5.pro/spec/streams.html). This is then done in reverse by the other clients in the room.
76 |
77 | **Front End:** Utilizes [Flutter](https://flutter.dev/) to handle cross-platform compling with a single codebase. [Cubits](https://bloclibrary.dev/bloc-concepts/#creating-a-cubit) are used to handle state and seperate out buisness logic from the UI. The state code can be found in `lib/cubit` and the UI code is in in `lib/view`.
78 |
79 | ## Etimology
80 |
81 | Luogo is an Italian word for Place. Just thought it sounded nice (and no one had an app called that yet :p)
82 |
83 | ## Acknowledgement
84 |
85 | Th work is supported by a [Sia Foundation](https://sia.tech/) grant.
86 |
--------------------------------------------------------------------------------
/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.14)
3 | project(s5_messenger_example LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "s5_messenger_example")
8 |
9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
10 | # versions of CMake.
11 | cmake_policy(VERSION 3.14...3.25)
12 |
13 | # Define build configuration option.
14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
15 | if(IS_MULTICONFIG)
16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
17 | CACHE STRING "" FORCE)
18 | else()
19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20 | set(CMAKE_BUILD_TYPE "Debug" CACHE
21 | STRING "Flutter build mode" FORCE)
22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
23 | "Debug" "Profile" "Release")
24 | endif()
25 | endif()
26 | # Define settings for the Profile build mode.
27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
31 |
32 | # Use Unicode for all projects.
33 | add_definitions(-DUNICODE -D_UNICODE)
34 |
35 | # Compilation settings that should be applied to most targets.
36 | #
37 | # Be cautious about adding new options here, as plugins use this function by
38 | # default. In most cases, you should add new options to specific targets instead
39 | # of modifying this function.
40 | function(APPLY_STANDARD_SETTINGS TARGET)
41 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
43 | target_compile_options(${TARGET} PRIVATE /EHsc)
44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
46 | endfunction()
47 |
48 | # Flutter library and tool build rules.
49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
50 | add_subdirectory(${FLUTTER_MANAGED_DIR})
51 |
52 | # Application build; see runner/CMakeLists.txt.
53 | add_subdirectory("runner")
54 |
55 |
56 | # Generated plugin build rules, which manage building the plugins and adding
57 | # them to the application.
58 | include(flutter/generated_plugins.cmake)
59 |
60 |
61 | # === Installation ===
62 | # Support files are copied into place next to the executable, so that it can
63 | # run in place. This is done instead of making a separate bundle (as on Linux)
64 | # so that building and running from within Visual Studio will work.
65 | set(BUILD_BUNDLE_DIR "$")
66 | # Make the "install" step default, as it's required to run.
67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
70 | endif()
71 |
72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
74 |
75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
76 | COMPONENT Runtime)
77 |
78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
79 | COMPONENT Runtime)
80 |
81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
82 | COMPONENT Runtime)
83 |
84 | if(PLUGIN_BUNDLED_LIBRARIES)
85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
87 | COMPONENT Runtime)
88 | endif()
89 |
90 | # Copy the native assets provided by the build.dart from all packages.
91 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/")
92 | install(DIRECTORY "${NATIVE_ASSETS_DIR}"
93 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
94 | COMPONENT Runtime)
95 |
96 | # Fully re-copy the assets directory on each build to avoid having stale files
97 | # from a previous install.
98 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
99 | install(CODE "
100 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
101 | " COMPONENT Runtime)
102 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
103 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
104 |
105 | # Install the AOT library on non-Debug builds only.
106 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
107 | CONFIGURATIONS Profile;Release
108 | COMPONENT Runtime)
109 |
--------------------------------------------------------------------------------