Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
23027f7
lib update
davisuga Oct 9, 2022
d26bc8c
added needed providers
davisuga Oct 9, 2022
6233814
feat: basic user types
davisuga Oct 9, 2022
416b7e1
feat: basic auth reducer
davisuga Oct 9, 2022
7963dba
feat: basic auth context
davisuga Oct 9, 2022
2f60c78
feat: basic visual offline login
davisuga Oct 9, 2022
6ce16c4
feat: basic relay config
davisuga Oct 9, 2022
6e04e43
feat: added createUser mutation
davisuga Oct 9, 2022
55f9f77
feat: added generated queries
davisuga Oct 10, 2022
0bb4475
feat(login): added query
davisuga Oct 10, 2022
475c895
feat: added sign up mutation
davisuga Oct 10, 2022
6aa8f1a
feat: added asyncstorage and promise libs
davisuga Oct 15, 2022
586b047
feat(utils): json parsing utils
davisuga Oct 15, 2022
50fa294
feat(reducer): added reducer persister
davisuga Oct 15, 2022
4f93627
login mutation logic
davisuga Oct 16, 2022
3570531
feat: navigation libs
davisuga Oct 16, 2022
6d1638f
feat: theme config
davisuga Oct 16, 2022
3e70315
added providers
davisuga Oct 16, 2022
6cd6c3f
env update
davisuga Oct 16, 2022
f19c40e
schema update
davisuga Oct 16, 2022
44f7592
relay codegen
davisuga Oct 16, 2022
9f8bf09
auth reducer update
davisuga Oct 16, 2022
4ce62cf
feat: simple react util
davisuga Oct 16, 2022
ee5aeea
feat(navigation): fixed dependency direction and params
davisuga Oct 16, 2022
f1493e0
simple alias
davisuga Oct 16, 2022
b26a62c
feat(auth): implemented main auth screens
davisuga Oct 16, 2022
aaa589d
refac(InsertCode): refatored functions
davisuga Oct 16, 2022
1976284
feat: created proper sign up page
davisuga Oct 17, 2022
f804e93
feat: sign in/up navigation enhancement
davisuga Oct 18, 2022
51a5421
fix: schema update
davisuga Oct 18, 2022
e4bc1d5
fix: code review fixes
davisuga Oct 23, 2022
961dd7f
Merge pull request #1 from programandonocosmos/feat/auth
davisuga Oct 30, 2022
a14e0c5
feat: basic translation context
davisuga Oct 23, 2022
e9b3a67
feat: added .env
davisuga Oct 27, 2022
e146545
feat: simple helper text component
davisuga Oct 30, 2022
62169b6
feat: moved dict into another file
davisuga Oct 30, 2022
405bf00
fix: fixed screen order
davisuga Oct 30, 2022
5d0c6e8
feat(InsertCode): add translations
davisuga Oct 30, 2022
3ce8ec3
feat(Login): add translations
davisuga Oct 30, 2022
20e53f1
feat(SignUp): add translations
davisuga Oct 30, 2022
038ce56
feat: reanimated config
davisuga Nov 13, 2022
edc9b68
feat: implemented animated select menu
davisuga Nov 13, 2022
79544f3
fix: fixed type for navigator
davisuga Nov 13, 2022
9adab06
feat: added new error translations
davisuga Nov 13, 2022
31281a5
feat: added toast errors
davisuga Nov 13, 2022
a1f4349
feat: added missing error messages
davisuga Nov 13, 2022
6f41b15
feat: added add account translations
davisuga Nov 20, 2022
9753dfd
feat: schema update
davisuga Nov 25, 2022
fe03f96
feat: expo version bump
davisuga Nov 25, 2022
2369c48
feat: new error messages
davisuga Nov 25, 2022
128d3c8
Merge branch 'develop' of https://github.com/programandonocosmos/cash…
davisuga Nov 25, 2022
b27a1a5
feat: schema update
davisuga Nov 25, 2022
4330a46
feat: bindings for popper
davisuga Nov 25, 2022
406af1c
feat: account list component
davisuga Nov 25, 2022
67ff44e
feat: labeled checkbox
davisuga Nov 25, 2022
f089478
feat: using popper for selectmenu
davisuga Nov 25, 2022
4fdc205
feat: user data read utility
davisuga Nov 25, 2022
4f70e5d
feat: binding for modal
davisuga Nov 25, 2022
8ef3172
feat: started add account screen
davisuga Nov 25, 2022
d0708de
fix: dark mode by default
davisuga Nov 25, 2022
d6dd853
feat: added missing deps
davisuga Nov 25, 2022
b6ece9d
feat: schema update
davisuga Nov 27, 2022
b0db7ff
feat: added value prop
davisuga Nov 27, 2022
b4ad04c
feat: added added missing translations
davisuga Nov 27, 2022
cfdaf84
fix: fixed prop type
davisuga Nov 27, 2022
3da0603
feat: new account fields forms + rounding numbers
davisuga Nov 27, 2022
3c953af
fix: fixed amount field bug
davisuga Nov 30, 2022
9e70963
fix(AddAccount): fixed query
davisuga Apr 30, 2023
5207351
fix: added missing dependencies
davisuga Apr 30, 2023
f87b924
feat: added rescript dep
davisuga Apr 30, 2023
22be852
fix(relay): fixed NaiveDateTime type
davisuga Apr 30, 2023
6ea943b
feat: added .env support
davisuga Apr 30, 2023
e3341d8
feat(relay): added relay check
davisuga Apr 30, 2023
b56edde
feat(dict): extra translations
davisuga Apr 30, 2023
bb56f79
feat(accounts): Made account component pretty
davisuga Apr 30, 2023
bb0fb85
feat: schema update
davisuga Apr 30, 2023
a57eb75
lint: unused code removal
davisuga Apr 30, 2023
cf06f99
Merge
davisuga Apr 30, 2023
a7d866e
Merge branch 'main' of https://github.com/programandonocosmos/cashtoo…
davisuga May 7, 2023
16a4d8c
Moved modal
davisuga May 7, 2023
f55fc22
Moved binding file
davisuga May 14, 2023
e37b4c0
Removed unused file
davisuga May 14, 2023
4499815
WIP
davisuga Nov 10, 2023
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
4 changes: 4 additions & 0 deletions .metals/.reports/metals/r_absolute-path_1683551454030
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Uri: untitled:<HOME>/gits/api-key-service/collect/server.scala

Error message: Provider "untitled" not installed
Error: java.nio.file.FileSystemNotFoundException: Provider "untitled" not installed
65 changes: 65 additions & 0 deletions .metals/metals.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
2023.05.08 10:10:52 INFO Started: Metals version 0.11.12 in workspace '/Users/davi/gits/cashtools-app' for client Visual Studio Code - Insiders 1.79.0-insider.
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.license.VersionPrinter printVersionOnly
INFO: Flyway Community Edition 9.16.3 by Redgate
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
INFO: See release notes here: https://rd.gt/416ObMi
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
INFO:
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.database.base.BaseDatabaseType createDatabase
INFO: Database: jdbc:h2:file:/Users/davi/gits/cashtools-app/.metals/metals (H2 2.1)
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory allAppliedMigrations
INFO: Schema history table "PUBLIC"."flyway_schema_history" does not exist yet
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Successfully validated 4 migrations (execution time 00:00.005s)
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory create
INFO: Creating Schema History table "PUBLIC"."flyway_schema_history" ...
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate migrateGroup
INFO: Current version of schema "PUBLIC": << Empty Schema >>
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
INFO: Migrating schema "PUBLIC" to version "1 - Create tables"
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
INFO: Migrating schema "PUBLIC" to version "2 - Server discovery"
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
INFO: Migrating schema "PUBLIC" to version "3 - Jar symbols"
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate doMigrateGroup
INFO: Migrating schema "PUBLIC" to version "4 - Fingerprints"
May 08, 2023 10:10:52 AM org.flywaydb.core.internal.command.DbMigrate logSummary
INFO: Successfully applied 4 migrations to schema "PUBLIC", now at version v4 (execution time 00:00.023s)
2023.05.08 10:10:52 INFO time: initialize in 0.26s
2023.05.08 10:10:53 WARN Build server is not auto-connectable.
2023.05.08 10:10:53 WARN no build tool detected in workspace '/Users/davi/gits/cashtools-app'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
2023.05.08 10:10:55 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
2023.05.08 10:10:58 INFO no build target found for /Users/davi/gits/api-key-service/collect/server.scala. Using presentation compiler with project's scala-library version: 3.2.2
2023.05.08 10:10:59 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
May 08, 2023 10:10:59 AM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
2023.05.08 10:11:04 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
2023.05.08 10:13:10 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
2023.05.08 10:13:14 INFO Shutting down server
2023.05.08 10:13:14 INFO shutting down Metals
2023.05.08 10:13:14 INFO Exiting server
2023.05.08 10:13:19 INFO Started: Metals version 0.11.12 in workspace '/Users/davi/gits/cashtools-app' for client Visual Studio Code - Insiders 1.79.0-insider.
May 08, 2023 10:13:19 AM org.flywaydb.core.internal.license.VersionPrinter printVersionOnly
INFO: Flyway Community Edition 9.16.3 by Redgate
May 08, 2023 10:13:19 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
INFO: See release notes here: https://rd.gt/416ObMi
May 08, 2023 10:13:19 AM org.flywaydb.core.internal.license.VersionPrinter printVersion
INFO:
May 08, 2023 10:13:20 AM org.flywaydb.core.internal.database.base.BaseDatabaseType createDatabase
INFO: Database: jdbc:h2:file:/Users/davi/gits/cashtools-app/.metals/metals (H2 2.1)
May 08, 2023 10:13:20 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Successfully validated 4 migrations (execution time 00:00.007s)
May 08, 2023 10:13:20 AM org.flywaydb.core.internal.command.DbMigrate migrateGroup
INFO: Current version of schema "PUBLIC": 4
May 08, 2023 10:13:20 AM org.flywaydb.core.internal.command.DbMigrate logSummary
INFO: Schema "PUBLIC" is up to date. No migration necessary.
2023.05.08 10:13:20 INFO time: initialize in 0.3s
2023.05.08 10:13:21 WARN Build server is not auto-connectable.
2023.05.08 10:13:21 WARN no build tool detected in workspace '/Users/davi/gits/cashtools-app'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
2023.05.08 10:13:21 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
2023.05.08 10:13:22 INFO no build target found for /Users/davi/gits/api-key-service/collect/server.scala. Using presentation compiler with project's scala-library version: 3.2.2
2023.05.08 10:13:22 INFO time: code lens generation in 1.8s
2023.05.08 10:13:23 WARN no build target for: /Users/davi/gits/api-key-service/collect/server.scala
2023.05.08 10:21:11 INFO Shutting down server
2023.05.08 10:21:11 INFO shutting down Metals
2023.05.08 10:21:11 INFO Exiting server
Binary file added .metals/metals.mv.db
Binary file not shown.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.watcherExclude": {
"**/target": true
}
}
4 changes: 1 addition & 3 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { env } from "./src/Env.bs";
import Routes from "./src/App.bs";
import StorybookUIRoot from "./.storybook/Storybook";
const App = () => {
return env.storybookMode ? <StorybookUIRoot /> : <Routes />;
return <Routes />;
};
export default App;
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include .env

dev:
yarn expo start
3 changes: 2 additions & 1 deletion bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"@rescript-react-native/async-storage",
"@ryyppy/rescript-promise",
"@rescript-react-native/safe-area-context",
"rescript-reanimated"
"rescript-reanimated",
"res-date-fns"
],
"ppx-flags": ["rescript-relay/ppx"]
}
44 changes: 17 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
"postinstall": "rescript build -with-deps"
},
"dependencies": {
<<<<<<< HEAD
=======
"@expo/webpack-config": "^0.17.0",
>>>>>>> 78a9cc8... feat: added storybook deps
"@react-native-async-storage/async-storage": "~1.17.3",
"@expo/webpack-config": "^18.0.1",
"@react-native-async-storage/async-storage": "1.17.11",
"@react-navigation/native": "^6.0.13",
"@react-navigation/native-stack": "^6.9.1",
"@react-navigation/stack": "^6.3.0",
Expand All @@ -32,40 +29,33 @@
"@storybook/react-native": "^6.0.1-beta.10",
"bs-fetch": "^0.6.2",
"dotenv": "^16.0.3",
"expo": "~46.0.9",
"expo-constants": "~14.0.2",
"expo-status-bar": "~1.4.2",
"expo": "^48.0.0",
"expo-constants": "~14.2.1",
"expo-status-bar": "~1.4.4",
"native-base": "^3.4.15",
<<<<<<< HEAD
"react": "18.1.0",
"react-native": "0.70.5",
"react-native-gesture-handler": "~2.8.0",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.3",
"react-native-gesture-handler": "~2.9.0",
"react-native-popper": "^0.3.2",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-svg": "13.4.0",
=======
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-gesture-handler": "~2.5.0",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-svg": "12.3.0",
>>>>>>> 78a9cc8... feat: added storybook deps
"react-native-toast-message": "^2.1.5",
"react-native-web": "~0.18.7",
"react-native-web": "~0.18.11",
"react-relay": "^14.1.0",
"relay-runtime": "^14.1.0",
"res-date-fns": "^1.2.0",
"rescript-nativebase": "^0.0.9",
"rescript-react-native": "^0.70.0",
"rescript-react-navigation": "^6.0.3",
"rescript-reanimated": "^2.3.11",
"rescript-relay": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"rescript": "^10.0.1"
"@babel/core": "^7.20.0",
"rescript": "^10.1.4"
},
"private": true
}
2 changes: 1 addition & 1 deletion relay.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
// You can add type definitions for custom scalars here.
// Whenever a custom scalar is encountered, the type emitted will correspond to the definition defined here. You can then deal with the type as needed when accessing the data.
customScalars: {
NaiveDateTime: "int",
NaiveDateTime: "float",
NaiveDate: "string",
Uuid: "string",
},
Expand Down
73 changes: 69 additions & 4 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,45 @@ schema {
mutation: Mutations
}

type Account {
id: Uuid!
time: NaiveDateTime!
name: String!
description: String
balance: Float!
preAllocation: PreAllocation
earning: Earning
isAvailable: Boolean!
inTrash: Boolean!
}

type Earning {
rate: Float!
index: EarningIndex!
}

enum EarningIndex {
CDI
FIXED
IPCA
}

input EarningInput {
rate: Float!
index: EarningIndex!
}

type Integration {
id: Uuid!
name: String!
time: NaiveDateTime!
}

type Mutations {
createAccount(token: String!, account: NewAccount!): Account!
editAccount(token: String!, id: Uuid!, updatedAccount: UpdatedAccount!): Account!
deleteAccount(token: String!, id: Uuid!): Uuid!
preAllocate(token: String!, time: NaiveDate!, from: Uuid!, to: Uuid!, amount: Float!, accumulative: Boolean!): PreAllocation!
createUser(username: String!, name: String!, email: String!): User!
sendLoginCode(email: String!): String!
deleteUser(token: String!): User!
Expand All @@ -24,16 +56,38 @@ scalar NaiveDate
"""NaiveDateTime"""
scalar NaiveDateTime

input NewAccount {
time: NaiveDateTime!
initialBalance: Float!
name: String!
description: String
preAllocation: PreAllocationInput
earning: EarningInput
isAvailable: Boolean!
}

input NewTransaction {
entryDate: NaiveDate!
entryAccountCode: String
exitAccountCode: String
entryAccountCode: Uuid
exitAccountCode: Uuid
amount: Float!
description: String
}

type PreAllocation {
amount: Float!
accumulative: Boolean!
}

input PreAllocationInput {
amount: Float
accumulative: Boolean
}

type Query {
apiVersion: String!
account(token: String!, id: Uuid!): Account!
accounts(token: String!, isPreAllocation: Boolean, inTrash: Boolean, tags: [Uuid!]): [Account!]!
transactions(token: String!): [Transaction!]!
me(token: String!): User!
token(email: String!, loginCode: Int!): String!
Expand All @@ -43,12 +97,23 @@ type Transaction {
id: Uuid!
relatedUser: Uuid!
entryDate: NaiveDate!
entryAccountCode: String
exitAccountCode: String
entryAccountCode: Uuid
entryAccountName: String
exitAccountCode: Uuid
exitAccountName: String
amount: Float!
description: String
}

input UpdatedAccount {
name: String
description: String
preAllocation: PreAllocationInput
earning: EarningInput
isAvailable: Boolean
inTrash: Boolean
}

type User {
id: Uuid!
username: String!
Expand Down
17 changes: 17 additions & 0 deletions src/RelayEnv.res
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,20 @@ let environment = RescriptRelay.Environment.make(
),
(),
)
module Query = %relay(`
query RelayEnvCheckQuery {
apiVersion
}
`)
Query.fetchPromised(~environment, ~variables=(), ())
->Promise.thenResolve(response =>
Js.Console.log("Starting app... API version: " ++ response.apiVersion)
)
->Promise.catch(err =>
Js.Console.error(
`Error while getting API version: ${Js.String.make(
Js.Json.stringifyAny(err),
)}. Server address: ${Env.apiUrl}`,
)->Promise.resolve
)
->ignore
Loading