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
31 changes: 24 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,40 @@ By participating in this project, you agree to abide by the debtors [code of con

[code of conduct]: https://github.com/akuqt/debtors/blob/develop/CODE_OF_CONDUCT.md

Fork, then clone the repo:
[Fork][fork], then clone the repo:

git clone https://github.com/<username>/debtors.git

[fork]: https://github.com/Akuqt/debtors/fork

System requirements:

node >= 20.0.0
yarn >= 1.22.22

Install dependencies:
Navigate to the project directory:

cd debtors

Install the dependencies:

yarn install

Link the repository to your eas account:

eas init

Generate a development build for your testing platform:

eas build --platform [android | ios | all] --profile development

Install the development build on your phone or emulator.

yarn
Start the application development server:

Make your change and make the lint and tests pass:
yarn start

yarn lint
yarn test
Use the development build to connect to the local server and start making changes.

Push to your fork and [submit a pull request][pr].

Expand All @@ -31,7 +48,7 @@ some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

- Write tests.
- Follow our Pull Request template.
- Follow our [commit style][commit].

[commit]: https://www.conventionalcommits.org/en/v1.0.0/#specification
74 changes: 64 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
# Debtors

## Overview
<h1 align="left">
<img src="docs/icon.png" alt="Home Screen" width="40">
<span><b>Debtors</b></span>
</h1>

Debtors is an application designed to help users manage and track their debtors.

<table>
<tr>
<td>
<img src="docs/home.jpeg" alt="Home Screen" width="250"/>
</td>
<td>
<img src="docs/movements.jpeg" alt="Movements Screen" width="250"/>
</td>
<td>
<img src="docs/settings.jpeg" alt="Settings Screen" width="250"/>
</td>
</tr>
</table>

## Features

- Add new debt entries
- Edit existing debt entries
- Delete debt entries
- View a summary of total debts
- Quickly add new debtors with amount and description.
- Edit or delete existing debt entries.
- Group debtors using folders for better organization.
- Group movements using tags for easy categorization.
- View a summary of all debtors with total amounts.
- Export debtor summaries to PDF or XLSX formats.
- Support for multiple languages.
- Schedule automated notifications for debtors.
- Use advanced filters to search and manage entries.
- Import and export the full database for backup or migration.

## Technologies Used

Expand All @@ -19,6 +40,12 @@ Debtors is an application designed to help users manage and track their debtors.
- [Reanimated](https://docs.swmansion.com/react-native-reanimated/)
- [i18next](https://www.i18next.com)

## Download

Right now the application is only available for Android due to pending testing on iOS.

You can download the latest Android release [here][download].

## Local Development

1. Clone the repository:
Expand Down Expand Up @@ -65,12 +92,39 @@ Debtors is an application designed to help users manage and track their debtors.

For any questions or suggestions, please [open an issue][issue].

[issue]: https://github.com/akuqt/debtors/issues

## Contributing

Contributions are welcome! See the [CONTRIBUTING](CONTRIBUTING.md) file for details.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License.

Copyright (c) 2025 Italo Alfaro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Notes

Personal project inspired by the need of debtors tracking.

<!-- Shortcuts -->

[issue]: https://github.com/akuqt/debtors/issues
[download]: https://github.com/Akuqt/debtors/releases/latest
4 changes: 2 additions & 2 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
android: {
adaptiveIcon: {
foregroundImage: "./src/assets/images/adaptive-icon.png",
backgroundColor: "#151718",
backgroundColor: "#FFFFFF",
},
package: IS_PROD ? "com.akuqt.debtors" : "com.akuqt.debtors.dev",
},
Expand All @@ -29,7 +29,7 @@ export default {
image: "./src/assets/images/splash-icon.png",
imageWidth: 200,
resizeMode: "contain",
backgroundColor: "#151718",
backgroundColor: "#FFFFFF",
dark: {
image: "./src/assets/images/splash-icon.png",
backgroundColor: "#151718",
Expand Down
Binary file added docs/home.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/movements.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/settings.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"expo-file-system": "~18.0.11",
"expo-font": "~13.0.2",
"expo-haptics": "~14.0.0",
"expo-image": "~2.0.7",
"expo-insights": "~0.8.1",
"expo-linking": "~7.0.5",
"expo-localization": "~16.0.1",
Expand Down
30 changes: 25 additions & 5 deletions src/app/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ export default function Home() {
);
dispatch({ type: "setLoading", payload: false });
dispatch({ type: "setFolders", payload: res });
dispatch({
type: "setTotal",
payload: res.reduce((acc, debtor) => acc + debtor.total, 0),
});
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[],
Expand Down Expand Up @@ -177,6 +173,24 @@ export default function Home() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sorter, search, isFocused, searchFolder]);

useEffect(() => {
let stotal = 0;
if (!selecting || selected.length === 0) {
stotal = folders.reduce((acc, debtor) => acc + debtor.total, 0);
} else {
for (const id of selected) {
const debtor = folders
.flatMap((f) => f.debtors)
.find((d) => d.id === id);
debtor && (stotal += debtor.total);
}
}
dispatch({
type: "setTotal",
payload: stotal,
});
}, [selecting, selected, folders]);

const { keyboardHeight } = useKeyboardHeightGradualAnimation();

const footerAnimatedStyle = useAnimatedStyle(() => {
Expand Down Expand Up @@ -725,11 +739,17 @@ export default function Home() {
},
}}
onLongPress={() => {
const ids = item.debtors.map((u) => u.id);
if (!selecting) {
dispatch({ type: "setSelecting", payload: true });
dispatch({
type: "setSelected",
payload: item.debtors.map((u) => u.id),
payload: ids,
});
} else {
dispatch({
type: "setSelected",
payload: [...selected, ...ids],
});
}
}}
Expand Down
23 changes: 22 additions & 1 deletion src/app/movements/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ export default function Movements() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isFocused]);

useEffect(() => {
let stotal: ReturnType<typeof getTotals> = {
debts: [0, 0],
payments: [0, 0],
remaining: 0,
};
if (!selecting || selected.length === 0) {
stotal = getTotals(movements);
} else {
const smovements: Movement[] = [];
for (const id of selected) {
const movement = movements.find((m) => m.id === id);
movement && smovements.push(movement);
}
stotal = getTotals(smovements);
}
dispatch({
type: "setTotal",
payload: stotal,
});
}, [movements, selected, selecting]);

const { generatePDF, generateXLSX } = useReportGenerator(tl, lang);
const { keyboardHeight } = useKeyboardHeightGradualAnimation();

Expand Down Expand Up @@ -187,7 +209,6 @@ export default function Movements() {
},
});
}
dispatch({ type: "setTotal", payload: getTotals(res) });
dispatch({ type: "setMovements", payload: res });
dispatch({ type: "setLoading", payload: false });
},
Expand Down
13 changes: 8 additions & 5 deletions src/app/settings/options/about/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import icon_image from "@/assets/images/adaptive-icon.png";
import { ThemedText } from "@/components";
import { VARS } from "@/constants/var";
import { useColors, useLocales } from "@/hooks";
import { styles } from "@/styles/settings";
import { SettingsAboutLocales } from "@/types";
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
import { Image } from "expo-image";
import React from "react";
import { useTranslation } from "react-i18next";
import { ScrollView, TouchableOpacity, View } from "react-native";
Expand Down Expand Up @@ -37,13 +38,15 @@ export default function About() {
>
{`Version: ${VARS.settings.VERSION}`}
</ThemedText>
<Icon
size={200}
name="account-cash"
color={colors.icon}
<Image
style={{
width: 250,
height: 250,
alignSelf: "center",
}}
source={icon_image}
contentFit="none"
transition={1000}
/>
<ThemedText
type="default"
Expand Down
Binary file modified src/assets/images/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/assets/images/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
declare module "*.png" {
const value: string;
export default value;
}
declare module "*.jpg" {
const value: string;
export default value;
}
declare module "*.jpeg" {
const value: string;
export default value;
}
declare module "*.svg" {
const value: string;
export default value;
}
Binary file modified src/assets/images/splash-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4991,6 +4991,11 @@ expo-haptics@~14.0.0:
resolved "https://registry.yarnpkg.com/expo-haptics/-/expo-haptics-14.0.1.tgz#ff4ead605e33f1917e615c9328af7ac1c34892dc"
integrity sha512-V81FZ7xRUfqM6uSI6FA1KnZ+QpEKnISqafob/xEfcx1ymwhm4V3snuLWWFjmAz+XaZQTqlYa8z3QbqEXz7G63w==

expo-image@~2.0.7:
version "2.0.7"
resolved "https://registry.yarnpkg.com/expo-image/-/expo-image-2.0.7.tgz#087ca651e3dcd2e92efdda11a6c9e3ad6fddc127"
integrity sha512-kv40OIJOkItwznhdqFmKxTMC5O8GkpyTf8ng7Py4Hy6IBiH59dkeP6vUZQhzPhJOm5v1kZK4XldbskBosqzOug==

expo-insights@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/expo-insights/-/expo-insights-0.8.2.tgz#7582c956354c5ba9ca066476531dc2d5233f3c9c"
Expand Down
Loading