diff --git a/.gitignore b/.gitignore index 8111594ba..be9299962 100644 --- a/.gitignore +++ b/.gitignore @@ -85,6 +85,10 @@ Pods/ .vscode/ Gemfile Gemfile.lock +!docs/index.html +!docs/images/screenshots/ +!docs/index.html +!docs/images/screenshots/ docs/ fastlane/ scripts/ diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 70be945ba..000000000 --- a/CLAUDE.md +++ /dev/null @@ -1,54 +0,0 @@ -# Architecture Guidelines - -## MVVM Structure (Kotlin Android) - -``` -android/app/src/main/java/com/cardsnap/ -├── data/ # Room DB, DAO, Repositories -├── domain/ # Models, OCR, Parser -├── ui/ # Screens, Navigation, Theme -├── util/ # Utilities -└── MainActivity.kt -``` - -## Dependency Rules - -- `ui` → `domain`, `data` (via ViewModel) -- `domain` → NO external dependencies -- `data` → `domain` (models) -- ViewModels mediate between UI and data layers - -## Naming Conventions - -- Screens: `*Screen.kt` -- ViewModels: `*ViewModel.kt` -- Repositories: `*Repository.kt` -- DAOs: `*Dao.kt` -- Models: `*Model.kt` or data classes -- Utils: `*Util.kt` or `*Helper.kt` - -## Code Size Limits - -- **Max 200 lines per file** (warn at 200, error at 300) -- **Max 30 lines per function** (warn at 30, error at 50) -- **Complexity ≤ 8** (warn), ≤ 10 (error) -- **Max nesting depth ≤ 4** -- **Max 3 parameters per function** - -If code exceeds these limits, REFACTOR immediately using Extract Method, Extract Class, or other patterns. - -## Forbidden Patterns - -- NO direct Room/DB access from UI layer -- NO business logic in Composables -- NO circular dependencies between modules -- All external deps go through repositories - -## Before Generating Code - -1. Identify which layer the code belongs to -2. Check dependency rules -3. Keep composables focused on UI only -4. Move business logic to ViewModels -5. Keep files under 200 lines, functions under 30 lines -6. Run: `./gradlew lint` before commit diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6787aed25..ce962ec61 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,73 +1,72 @@ -# Contributor Covenant Code of Conduct +# Contributor Code of Conduct ## Our Pledge -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. ## Our Standards -Examples of behavior that contributes to a positive environment for our community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +Examples of behavior that contributes to creating a positive environment +include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting feedback +- Accepting responsibility and apologizing when our actions affect others +- Focusing on what is best not just for us as individuals, but for the + overall community +- Examples of unacceptable behavior include: +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political + harassment +- Public or private harassment +- Publishing others' private information, such as a home address or + financial history without their explicit permission +- Other conduct which could reasonably be considered harmful to a + reasonable person ## Enforcement Responsibilities -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. +Community leaders have the right to remove, edit, or reject comments, +commits, code, wiki edits, issues, and other contributions that are not +aligned to this Code of Conduct, and will communicate reasons for enforcement +decisions when appropriate. ## Scope -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. +This Code of Conduct applies within all community spaces, and also applies +when any individual officially represents the community in public spaces. +Examples of representing the community in public spaces include using an +official community email address, posting to an official community forum, or +entering an official community event, while representing the community in +public spaces. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[CONTACT_EMAIL]. All complaints will be reviewed and investigated promptly +and fairly. -**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. - -### 2. Warning -**Community Impact**: A violation through a single incident or series of actions. - -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. - -### 3. Temporary Ban -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the community. +All community leaders are obligated to respect the privacy and security of +the reporter of any incident. Response templates are available on adapting +the Code of Conduct to different contexts. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, +available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. -For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. \ No newline at end of file +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md index fb080888b..6db374431 100644 --- a/PRIVACY_POLICY.md +++ b/PRIVACY_POLICY.md @@ -10,11 +10,9 @@ CardSnap ("we", "our", or "us") is committed to protecting your privacy. This Pr ### Information You Provide - **Scanned Contact Data**: When you scan a business card, the extracted contact information is stored locally on your device. -- **Account Information**: If you choose to sync contacts, we may collect minimal account data. ### Information Collected Automatically - **Device Information**: We collect basic device information (Android version, device model) for crash reporting. -- **Usage Data**: We may collect anonymous usage statistics to improve the app. ### Camera Access - CardSnap requires camera access to scan business cards. @@ -26,7 +24,6 @@ CardSnap ("we", "our", or "us") is committed to protecting your privacy. This Pr We use the information we collect to: - Provide, maintain, and improve the CardSnap app - Process and save scanned business card data to your device -- Respond to your comments and questions ## Data Storage @@ -55,14 +52,6 @@ You have the right to: - Delete your stored data (Settings > Reset All Data) - Revoke camera or contacts permissions at any time through device settings -## Children's Privacy - -CardSnap does not knowingly collect personal information from children under 13. - -## Changes to This Policy - -We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new policy on this page. - ## Contact Us If you have questions about this Privacy Policy, please contact us: diff --git a/android/build.gradle b/android/build.gradle index 283c61be0..b73f0e2fe 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.6.0" apply false - id("org.jetbrains.kotlin.android") version "1.9.22" apply false - id("com.google.devtools.ksp") version "1.9.22-1.0.17" apply false + id 'com.android.application' version '8.6.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.22' apply false + id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false } allprojects { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 2ea3535dc..e7646dead 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/android/settings.gradle b/android/settings.gradle index 942462e31..bc77306dc 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,2 +1,10 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + rootProject.name = 'CardSnap' include ':app' diff --git a/docs/images/screenshots/contacts-list.svg b/docs/images/screenshots/contacts-list.svg new file mode 100644 index 000000000..006672484 --- /dev/null +++ b/docs/images/screenshots/contacts-list.svg @@ -0,0 +1,31 @@ + + + + ← Contacts + + 📤 + + + J + John Smith + TechCorp LLC + john@techcorp.com + + 🗑 + + + S + Sarah Johnson + Design Studio Inc + sarah@designstudio.com + + 🗑 + + + M + Michael Chen + Global Finance Corp + m.chen@globalfinance.com + + 🗑 + diff --git a/docs/images/screenshots/review-contact.svg b/docs/images/screenshots/review-contact.svg new file mode 100644 index 000000000..fa2ee989d --- /dev/null +++ b/docs/images/screenshots/review-contact.svg @@ -0,0 +1,24 @@ + + + + ← Review Contact + + + 📸 Captured Card Image + + Name + John Smith + + Email + john@techcorp.com + + Phone + +1 555-987-6543 + + Company + TechCorp LLC + + ↻ Retake + + 💾 Save + diff --git a/docs/images/screenshots/scan-screen.svg b/docs/images/screenshots/scan-screen.svg new file mode 100644 index 000000000..cb00fdd96 --- /dev/null +++ b/docs/images/screenshots/scan-screen.svg @@ -0,0 +1,23 @@ + + + + + + + + + + CardSnap + + Fit the card inside the frame + Point camera at business card + and tap to capture + + + 📷 + + + + 👥 + or upload a photo + diff --git a/docs/images/screenshots/settings.svg b/docs/images/screenshots/settings.svg new file mode 100644 index 000000000..296497913 --- /dev/null +++ b/docs/images/screenshots/settings.svg @@ -0,0 +1,26 @@ + + + + ← Settings + Scanner + + OCR Languages + eng + + Auto-save contacts + + + + Notifications + + + + Haptic feedback + + + + Data usage + Wi-Fi only + + 🗑 Reset All Data + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..7bba321c7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,307 @@ + + + + + + CardSnap - Business Card Scanner + + + + + + + + + + + + +
+ +
+ +
+
+

Scan Business Cards
in a Snap

+

Point your camera, capture the card, and save the contact — all in seconds. Powered by Google ML Kit OCR and built with native Kotlin.

+ +
+ CardSnap Scan Screen +
+
+ + + +
+ +
+
+
+

Powerful Features

+

Everything you need to digitize your business card collection

+
+
+
+
📸
+

Instant Scanning

+

Point your camera at any business card and capture with a single tap. Built-in guide frame ensures perfect alignment.

+
+
+
🤖
+

Smart OCR

+

Google ML Kit Text Recognition extracts all text with high accuracy, even from challenging card designs.

+
+
+
🧠
+

Intelligent Parsing

+

Automatically identifies names, emails, phones, companies, job titles, and websites from raw OCR text.

+
+
+
💾
+

Auto-Save

+

Optionally save contacts automatically after each scan. Never lose a contact again.

+
+
+
📤
+

Export & Share

+

Export contacts as vCard or CSV. Share via email, messaging apps, or any other app on your device.

+
+
+
🌐
+

Multi-Language

+

Support for English, Chinese, German, French, Spanish, Japanese, Korean, and more OCR languages.

+
+
+
+
+ +
+
+
+

How It Works

+

Three simple steps to digitize any business card

+
+
+
+
1
+

Point & Capture

+

Open the app and point your camera at a business card. Align it within the guide frame and tap capture.

+
+
+
2
+

Automatic OCR

+

The image is processed by ML Kit's Text Recognition engine. Our parser intelligently extracts contact details.

+
+
+
3
+

Review & Save

+

Review the extracted details, edit any fields if needed, then save to your device or export as vCard.

+
+
+
+
+ +
+
+
+

Use Cases

+

Perfect for anyone who collects business cards

+
+
+
+
🎪
+

Networking Events

+

Scan dozens of cards at conferences and meetups

+
+
+
💼
+

Sales Teams

+

Capture prospect info during field visits

+
+
+
👥
+

Recruiters

+

Save candidate details from career fairs

+
+
+
🏠
+

Real Estate

+

Collect agent and client contact info

+
+
+
🏡
+

Personal Use

+

Digitize your stack of physical cards at home

+
+
+
+
+ +
+
+

Download CardSnap

+

Get the latest version and start scanning business cards in seconds

+ +
+
+ +
+
+
+

Built With

+
+
+ Kotlin 1.9.22 + Jetpack Compose + Material 3 + CameraX + ML Kit OCR + Room Database + DataStore + Coroutines + Coil + MVVM +
+
+
+ + + +