Skip to content

Commit 4d9fdfc

Browse files
committed
Initial (open-source)
0 parents  commit 4d9fdfc

File tree

3,062 files changed

+544438
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,062 files changed

+544438
-0
lines changed

.circleci/config.yml

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
default_config: &default_config
2+
environment:
3+
SENTRY_ORG: shift-reset-llc
4+
SENTRY_PROJECT: actual
5+
YARN_CACHE_FOLDER: ~/.cache/yarn
6+
CSC_LINK: ~/windows-shift-reset-llc.p12
7+
8+
cached_files: &cached_files
9+
paths:
10+
- ~/.cache/yarn
11+
- node_modules
12+
- ./packages/desktop-electron/node_modules
13+
- ./packages/loot-core/node_modules
14+
- ./mobile/node_modules
15+
- ./import-ynab4/node_modules
16+
- ./api/node_modules
17+
- ./node-libofx/node_modules
18+
- ./loot-design/node_modules
19+
- ./desktop-client/node_modules
20+
key: v3-dependencies-{{ checksum "yarn.lock" }}
21+
22+
version_tag_only: &version_tag_only
23+
filters:
24+
branches:
25+
ignore: /.*/
26+
tags:
27+
only: /^\d+\.\d+\.\d+$/
28+
29+
version: 2.1
30+
31+
orbs:
32+
win: circleci/[email protected]
33+
34+
jobs:
35+
test:
36+
<<: *default_config
37+
38+
docker:
39+
- image: circleci/node:12.13
40+
41+
working_directory: ~/repo
42+
43+
steps:
44+
- checkout
45+
46+
- restore_cache:
47+
keys:
48+
- v3-dependencies-{{ checksum "yarn.lock" }}
49+
50+
- run: yarn install --pure-lockfile
51+
52+
- save_cache:
53+
<<: *cached_files
54+
55+
- run: yarn test
56+
57+
build_windows:
58+
<<: *default_config
59+
60+
executor:
61+
name: win/default
62+
63+
working_directory: ~/repo
64+
65+
steps:
66+
- checkout
67+
68+
- run:
69+
command: npm install -g @sentry/cli --unsafe-perm
70+
shell: bash
71+
72+
- run:
73+
command: echo $WINDOWS_CERT | base64 --decode >> ${HOME}/windows-shift-reset-llc.p12
74+
shell: bash
75+
76+
- run:
77+
command: yarn install --pure-lockfile
78+
shell: bash
79+
80+
- run:
81+
command: ./bin/package --release --version ${CIRCLE_TAG}
82+
shell: bash
83+
84+
build_linux:
85+
<<: *default_config
86+
87+
docker:
88+
- image: circleci/node:12.13
89+
90+
working_directory: ~/repo
91+
92+
steps:
93+
- checkout
94+
95+
- restore_cache:
96+
keys:
97+
- v3-dependencies-{{ checksum "yarn.lock" }}
98+
99+
- run: yarn install --pure-lockfile
100+
101+
- run: sudo npm install -g @sentry/cli --unsafe-perm
102+
103+
- run: ./bin/package --release --version ${CIRCLE_TAG}
104+
105+
workflows:
106+
version: 2
107+
test:
108+
jobs:
109+
- test
110+
build_version:
111+
jobs:
112+
- test:
113+
<<: *version_tag_only
114+
- build_windows:
115+
<<: *version_tag_only
116+
requires:
117+
- test
118+
- build_linux:
119+
<<: *version_tag_only
120+
requires:
121+
- test

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn.lock text eol=lf

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/data/*
2+
!data/.gitkeep
3+
/data2
4+
packages/desktop-electron/client-build
5+
packages/desktop-electron/.electron-symbols
6+
packages/desktop-electron/dist
7+
packages/desktop-electron/loot-core
8+
node_modules
9+
.DS_Store
10+
lerna-debug.log
11+
Actual-*
12+
.#*
13+
**/xcuserdata/*
14+
.secret-tokens
15+
bundle.desktop.js
16+
bundle.desktop.js.map
17+
bundle.mobile.js
18+
bundle.mobile.js.map
19+
.sentryclirc
20+
export-2020-01-10.csv

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
This is the source code for [Actual](https://actualbudget.com), a local-first personal finance tool. It is 100% free and open-source.
3+
4+
If you are only interested in running the latest version, you don't need this repo. You can get the latest version through npm.
5+
6+
More docs are available in the [docs](XXX) folder.
7+
8+
## Installation
9+
10+
### The easy way: using a server (recommended)
11+
12+
The easiest way to get Actual running is to use the [actual-sync](XXX) project. That is the server for syncing changes across devices, and it comes with the latest version of Actual. The server will provide both the web project and a server for syncing.
13+
14+
```
15+
git clone XXX
16+
cd actual-sync
17+
yarn install
18+
yarn start
19+
```
20+
21+
Navigate to https://localhost:5006 in your browser and you will see Actual.
22+
23+
You should deploy the server somewhere so you can access your data from anywhere. See instructions on the [actual-sync](XXX) repo.
24+
25+
### Without a server
26+
27+
This will give you a fully local web app without a server. This npm package is the `packages/desktop-client` package in this repo built for production:
28+
29+
```
30+
yarn add @actual-app/web
31+
```
32+
33+
Now you need to serve the files in `node_modules/@actual-app/web/build`. One way to do it:
34+
35+
```
36+
cd node_modules/@actual-app/web/build
37+
npx http-server .
38+
```
39+
40+
Navigate to http://localhost:8080 and you should see Actual.
41+
42+
## Building
43+
44+
If you want to build the latest version, see [releasing.md](XXX). It provides instructions for building this code into the same artifacts that come from npm.
45+
46+
## Run locally
47+
48+
Both the electron and web app can started with a single command. When running in development, it will store data in a `data` directory in the root of the `actual` directory.
49+
50+
First, make sure to run `yarn install` to install all dependencies.
51+
52+
In the root of the project:
53+
54+
```
55+
yarn start # Run the electron app
56+
yarn start:browser # Run the web app
57+
58+
```
59+
60+
## Code structure
61+
62+
The app is split up into a few packages:
63+
64+
* loot-core - The core application that runs on any platform
65+
* loot-design - The generic design components that make up the UI
66+
* desktop-client - The desktop UI
67+
* desktop-electron - The desktop app
68+
* mobile - The mobile app
69+
70+
More docs are available in the [docs](XXX) folder.

bin/format-staged

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx" | sed 's| |\\ |g')
3+
[ -z "$FILES" ] && exit 0
4+
5+
# Prettify all selected files
6+
echo "$FILES" | xargs ./node_modules/.bin/prettier --write
7+
8+
# Add back the modified/prettified files to staging
9+
echo "$FILES" | xargs git add
10+
11+
exit 0

bin/import-open-source-package

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh -e
2+
3+
ROOT=$(cd "`dirname $0`"; pwd)
4+
NPM_NAME="$1"
5+
NAME="$2"
6+
PACKAGE_DIR="`dirname "$ROOT"`/packages/$NAME"
7+
8+
if [ -z "$NAME" ] || [ -z "$NPM_NAME" ]; then
9+
echo "Usage: `basename $0` <npm-name> <local-name>"
10+
exit 1
11+
fi
12+
13+
if [ -d "$PACKAGE_DIR" ]; then
14+
read -p "Package exists, remove $PACKAGE_DIR? [y/N] " -r
15+
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
16+
exit 2
17+
fi
18+
fi
19+
20+
rm -rf "$PACKAGE_DIR"
21+
URL="`npm view "$NPM_NAME" dist.tarball`"
22+
TMPDIR="`mktemp -d`"
23+
24+
cd "$TMPDIR"
25+
wget -O tar.tgz "$URL"
26+
tar xvzf tar.tgz
27+
mv package "$PACKAGE_DIR"

bin/make-release

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash -e
2+
3+
VERSION=""
4+
5+
POSITIONAL=()
6+
while [[ $# -gt 0 ]]; do
7+
key="$1"
8+
9+
case $key in
10+
--version)
11+
VERSION="$2"
12+
shift
13+
shift
14+
;;
15+
*)
16+
POSITIONAL+=("$1")
17+
shift
18+
;;
19+
esac
20+
done
21+
set -- "${POSITIONAL[@]}"
22+
23+
NOTES="$@"
24+
25+
if [ -z "$VERSION" ]; then
26+
echo "--version is required";
27+
exit 1
28+
fi
29+
30+
echo "Version: $VERSION"
31+
echo "Notes: $NOTES"
32+
read -p "Make release? [y/N] " -r
33+
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
34+
exit 2
35+
fi
36+
37+
source ./.secret-tokens
38+
39+
# Tag and push to make windows and linux versions
40+
git push origin master
41+
git tag -a "$VERSION" -m "$NOTES"
42+
git push origin "$VERSION"
43+
44+
# Make a macOS version
45+
./bin/package --release --version "$VERSION"
46+
47+
# TODO: browser version
48+
49+
# Finally, update github issues
50+
curl -X POST -H "x-release-token: $RELEASE_TOKEN" https://actual-automoto.fly.dev/release/"$VERSION"

0 commit comments

Comments
 (0)