-
Notifications
You must be signed in to change notification settings - Fork 0
Refocus README for developers #110
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,46 +1,105 @@ | ||||||
| # UpChat | ||||||
|
|
||||||
| UpChat is an open source messenger for android. | ||||||
|
|
||||||
| [](https://github.com/ARCOOON/UpChat/actions/workflows/build.yml) | ||||||
|
|
||||||
| # Development Status | ||||||
| UpChat is an Android chat client built with Kotlin, Firebase Realtime Database, and a locally managed cryptography stack. This document focuses on how the project is organized and how to get productive quickly as a contributor. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## What’s in the box? | ||||||
|
|
||||||
| - **Realtime messaging** – Conversations sync through Firebase Database and Firebase Cloud Messaging. | ||||||
| - **Encrypted content** – AES-GCM keys are negotiated per conversation, with canonical MACs for message integrity. | ||||||
| - **Media sharing** – Inline photo capture/upload with storage backed by Firebase Storage. | ||||||
| - **Secure storage** – Jetpack DataStore wrapped in Android Keystore protects local session data. | ||||||
| - **Tooling** – GitHub Actions workflow builds debug/release artifacts and surfaces lint output. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| - [x] Conversation | ||||||
| - [x] Send Message | ||||||
| - [ ] Send Files | ||||||
| - [x] Send Photos / Videos (Photos supported) | ||||||
| - [ ] Send Audio | ||||||
| - [ ] Highlight Links | ||||||
| - [ ] Message Actions: Delete, Reply and Edit | ||||||
| - [x] Messages design | ||||||
| ## Project layout | ||||||
|
|
||||||
| - [x] Home | ||||||
| - [x] View all you chats | ||||||
| - [X] Delete a single message _(working on)_ | ||||||
| - [ ] Delete a conversation | ||||||
| - [x] Is the Main Activity | ||||||
| ``` | ||||||
| app/ | ||||||
| ├─ src/main/java/com/devusercode/upchat/ | ||||||
| │ ├─ security/ # AES, MAC, HKDF, RSA helpers | ||||||
| │ ├─ utils/ # Conversation helpers, storage access, activity utilities | ||||||
| │ ├─ adapter/ # RecyclerView adapters and view holders | ||||||
| │ ├─ models/ # Firebase-backed data models | ||||||
| │ └─ *Activity.kt # UI entry points for each screen | ||||||
| ├─ src/main/res/ # XML layouts, drawables, strings | ||||||
| └─ build.gradle # Android module configuration | ||||||
| ``` | ||||||
|
|
||||||
| - [x] View All Users (in Future: Add user) | ||||||
| - [x] View all users | ||||||
| - [ ] Block users | ||||||
| - [x] View user profile | ||||||
| Gradle build logic lives at the root alongside the `settings.gradle` file. Unit and instrumentation tests mirror the source tree under `src/test` and `src/androidTest` respectively. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Architecture overview | ||||||
|
|
||||||
| | Layer | Notes | | ||||||
| | --- | --- | | ||||||
| | **UI** | View-based activities and RecyclerView adapters render conversations, profiles, and onboarding flows. Compose interop utilities are present while a full migration is planned. | | ||||||
| | **Domain** | `ConversationUtil` coordinates message send/receive flows, atomic conversation creation, and MAC payload assembly. | | ||||||
| | **Security** | `security/` contains the symmetric/asymmetric primitives; `MessageIntegrity` unifies canonical payload generation. | | ||||||
| | **Data** | Firebase Database/Storage handle persistence, with `StorageController` wrapping encrypted DataStore for local preferences and session state. | | ||||||
| | **Background** | `MessagingService` subscribes to FCM notifications for new messages. | | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Getting started | ||||||
|
|
||||||
| 1. **Clone the repo** | ||||||
| ```bash | ||||||
| git clone https://github.com/ARCOOON/UpChat.git | ||||||
| cd UpChat | ||||||
| ``` | ||||||
| 2. **Supply Firebase config** | ||||||
| - Place `google-services.json` inside `app/`. | ||||||
| - Ensure Database and Storage rules match your test environment. | ||||||
| 3. **Install dependencies** | ||||||
| ```bash | ||||||
| ./gradlew dependencies | ||||||
| ``` | ||||||
| 4. **Build and run** | ||||||
| ```bash | ||||||
| ./gradlew assembleDebug | ||||||
| ``` | ||||||
| 5. **Execute checks** | ||||||
| ```bash | ||||||
| ./gradlew lint test | ||||||
| ``` | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Development tips | ||||||
|
|
||||||
| - **Cryptography** – `ConversationKeyManager` publishes RSA public keys and distributes shared secrets. When extending message types, use `MessageIntegrity.canonicalPayload` to keep MAC coverage consistent. | ||||||
| - **Messaging pipeline** – `ConversationActivity` requests a shared key, feeds it to `ConversationUtil`, and observes Firebase for message streams. `MessageAdapter` binds decrypted content and verification state in view holders. | ||||||
| - **Secure persistence** – `StorageController` exposes suspending getters/setters backed by an encrypted DataStore; prefer these over direct SharedPreferences access. | ||||||
| - **UI consistency** – Activity transition helpers live in `ActivityTransitions.kt`; update both enter and exit animations when adding new flows. | ||||||
| - **Testing** – Run `./gradlew lint` for static checks and `./gradlew test` for unit coverage before submitting patches. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Contributing | ||||||
|
|
||||||
| 1. Fork the repository and branch from `main`. | ||||||
| 2. Follow Kotlin coding standards and keep changes modular. | ||||||
| 3. Document security-sensitive modifications clearly in commit messages and pull requests. | ||||||
| 4. Provide screenshots or screen recordings when altering UI behavior. | ||||||
| 5. Open a pull request once lint and tests pass locally. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| - [ ] Preferences | ||||||
| - [ ] Customise message design | ||||||
| - [ ] Customise accent color | ||||||
| - [ ] Privacy | ||||||
| - [ ] Who can message you (everyone / no one) | ||||||
| - [ ] Blocked users | ||||||
| ## Security | ||||||
|
|
||||||
| - [x] App | ||||||
| - [x] Signing Config | ||||||
| - [x] Auto Update (download and install) | ||||||
| - Per-conversation secrets are established via RSA-wrapped keys and expanded with HKDF. | ||||||
| - Message data is encrypted with AES-GCM; MACs cover ciphertext plus sender metadata. | ||||||
| - Local secrets are stored with encrypted Jetpack DataStore using Android Keystore-backed keys. | ||||||
| - Report vulnerabilities privately to **security@upchat.app** (PGP preferred). Avoid public issues for sensitive disclosures. | ||||||
|
||||||
| - Report vulnerabilities privately to **security@upchat.app** (PGP preferred). Avoid public issues for sensitive disclosures. | |
| - Report vulnerabilities privately via GitHub [Security Advisories](https://github.com/ARCOOON/UpChat/security/advisories/new). Avoid public issues for sensitive disclosures. |
Copilot
AI
Feb 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description states this is a "documentation-only change" that rewrites the README, but this PR includes substantial code changes throughout the application including security implementations, storage refactoring, activity changes, and new features. The description should accurately reflect the scope of changes to help reviewers and maintainers understand the full impact of this PR.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,6 +35,7 @@ import com.devusercode.upchat.utils.ErrorCodes | |||||
| import com.devusercode.upchat.utils.StorageController | ||||||
| import com.devusercode.upchat.utils.UserUtils | ||||||
| import com.devusercode.upchat.utils.Util | ||||||
| import com.devusercode.upchat.utils.setComposeContent | ||||||
| import com.firebase.ui.database.FirebaseRecyclerOptions | ||||||
| import com.google.android.material.appbar.AppBarLayout | ||||||
| import com.google.android.material.textfield.TextInputEditText | ||||||
|
|
@@ -70,6 +71,7 @@ class ConversationActivity : AppCompatActivity() { | |||||
| private var participant: User? = null | ||||||
| private var user: User? = null | ||||||
|
|
||||||
| private lateinit var contentView: View | ||||||
| private lateinit var storageController: StorageController | ||||||
| private lateinit var conversationUtil: ConversationUtil | ||||||
| private var conversationSecret: String? = null | ||||||
|
||||||
| private var conversationSecret: String? = null | |
| @Volatile private var conversationSecret: String? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: 'canonicalPayload' should be 'canonicalize' in the README development tips section to match the actual method name used in the code.