Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ A android app that take down the headace of remember passwords. It is open sourc
2. Download the apk for your phone. If Don't know the architecture of phone then download apk file that has universal in its name.
3. Install the apk and you are ready to use the app.

## Building The App

1. Clone the repository on your machine.

2. Open the project own your Android Studio.

3. Follow the general step and build the app.

4. For code documention and support docs, check the `docs/` folder in our repository. You can even seek help on your [telegram community](https://t.me/passwordmanagercommunity)

## Contribution Are Appicated!!!

By, contribuating to project you accept the [CONTRIBUTING.md](CONTRIBUTING.md) & [MIT License](LICENSE.txt).
Expand Down
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ android {
versionCode 1
versionName "0.1.0-Alpha"
}

viewBinding {
enabled = true
}

signingConfigs {
release {
Expand Down Expand Up @@ -64,9 +60,14 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildFeature {
viewBinding true
}
}

dependencies {
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.databinding:viewbinding:7.4.1'
}
86 changes: 10 additions & 76 deletions docs/database-design-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,14 @@ In this file, You will find the general structure & format in which app stores u
> [!NOTE]
> Database schema versioning system is completely serperte from the app versioning system.

**Database**: Sqlite3(`master.db`), Jsonfile(`sys.db`)

## sys.db
sys.db is system db in json file where we store all the important data specfic to app and this data is usefull, during the schema updation process. this info is use by app updation module to change db schema when jump from one version to another.

> [!IMPORTANT]
> System database schema must not be alter between the app version.
> It allowed to add data but, not allowed to remove existing as different version of app rely on same data for there effective operation.

```json
{
"app-name": "password-manager",
"app-version": "v0.0.0-Alpha",
"db-schema-version": "v1",
"installed-at": "dd/mm/yy",
"update-at": [
{
"from": "v0.0.0-alpha",
"to": "v0.1.0-Alpha",
"on": "dd/mm/yy"
}
],
"app-setting": {
"extensive-mode": false,
"prefer-dark-mode": true,
"external-db": {
"uri": "postgresql://username:password@host:port/dbname[?paramspec]",
"server": "postgresql"
....
}
}
....
}
```
**Database**: Sqlite3(`master.db`)

## master.db

It is a database where user info is stored. It schema changes often between the app version based on change in business requirements. Here, in this section you will find all the version of database schema & will also find info on how we adopated to the new schema.

---

### In Future (v2)

| Tables | Description |
| ----------- | ---------------------------- |
| `users` | For storing user entity. |
| `passwords` | For storing password entity. |

#### users table

| Fields | Property | Constraints | Description |
| ----------- | ----------- | ------------------------------ | ---------------------------------------------------------- |
| `id` | Number | PRIMARY KEY | -- |
| `username` | VarChar(40) | NOT NULL | domain name to which password enitity is associated with |
| `password` | VarChar(60) | NOT NULL | username on that domain. email can be also used as a value |
| `type` | VarChar(60) | Enum['sys', 'admin', 'normal'] | password on that domain |
| `createdat` | Date | -- | -- |

#### passwords table

| Fields | Property | Constraints | Description |
| ----------- | ----------- | ------------------ | ---------------------------------------------------------- |
| `id` | Number | PRIMARY KEY | -- |
| `domain` | VarChar(40) | NOT NULL | domain name to which password enitity is associated with |
| `username` | VarChar(60) | NOT NULL | username on that domain. email can be also used as a value |
| `password` | VarChar(60) | NOT NULL | password on that domain |
| `createdat` | Date | -- | -- |
| `updatedat` | Date | -- | -- |
| `ownby` | users(id) | FORIGN KEY | -- |

#### Implementation.
create a defualt user called (101, "passcoder", "qwerty", "sys", "05/08/24") and make all passwords as own by him.

---

### Current Database Design (v1)

| Tables | Description |
Expand All @@ -90,11 +23,12 @@ create a defualt user called (101, "passcoder", "qwerty", "sys", "05/08/24") and

#### passwords table

| Fields | Property | Constraints | Description |
| ----------- | ----------- | ------------------ | ---------------------------------------------------------- |
| `id` | Number | PRIMARY KEY | -- |
| `domain` | VarChar(40) | NOT NULL | domain name to which password enitity is associated with |
| `username` | VarChar(60) | NOT NULL | username on that domain. email can be also used as a value |
| `password` | VarChar(60) | NOT NULL | password on that domain |
| `createdat` | Date | -- | -- |
| `updatedat` | Date | -- | -- |
| Fields | Property | Constraints | Description |
| ----------- | ------------ | ------------------------------ | -------------------------------------------------------------------- |
| `id` | Integer | PRIMARY KEY, AUTOINCREMENT | -- |
| `domain` | VarChar(40) | NOT NULL | domain/platform name to which password enitity is associated with. |
| `username` | VarChar(60) | NOT NULL | username on that domain/platform. email can be even used as a value. |
| `password` | VarChar(60) | NOT NULL | password on that domain/platform |
| `notes` | VarChar(100) | -- | -- |
| `createdat` | Date | DEFAULT CURRENT_TIMESTAMP | -- |
| `updatedat` | Date | DEFAULT CURRENT_TIMESTAMP | -- |