Skip to content

Commit 754c506

Browse files
committed
2 parents 4a5de41 + 25e3ee8 commit 754c506

18 files changed

Lines changed: 168 additions & 73 deletions

File tree

‎.env.example‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ SMTP_ADDRESS=
1212
SMTP_PORT=465
1313
SMTP_USERNAME=
1414
SMTP_PASSWORD=
15-
TLS=true
15+
TLS=true
16+
17+
# Database Configuration
18+
DB_HOST=localhost
19+
POSTGRES_PASSWORD=postgres
20+
POSTGRES_USER=postgres

‎.gitignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@
4040

4141
# Ignore Jetbrains IDEs
4242
.idea
43+
44+
# Ignore macOS specific files
45+
*/.DS_Store
46+
.DS_Store
47+
48+
# Ignore .devcontainer files
49+
compose-dev.yaml

‎CONTRIBUTING.md‎

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,39 @@
22

33
It means so much that you're interested in contributing to Maybe! Seriously. Thank you. The entire community benefits from these contributions!
44

5-
Before submitting a new issue or PR, check if it already exists in [issues](https://github.com/maybe-finance/maybe/issues) or [PRs](https://github.com/maybe-finance/maybe/pulls) so you have an idea of where things stand.
5+
## House Rules
66

7-
Then, once you're ready to begin work, submit a draft PR with your high-level plan (or the full solution).
7+
- Before contributing, please check if it already exists in [issues](https://github.com/maybe-finance/maybe/issues) or [PRs](https://github.com/maybe-finance/maybe/pulls)
8+
- Given the speed at which we're moving on the codebase, we don't assign issues or "give" issues to anyone.
9+
- When multiple PRs are submitted for the same issue, we take the one that most succinctly & efficiently solves a given problem and stays within the scope of work.
10+
- Priority is generally given to previous committers as they've proven familiarity with the codebase and product.
811

9-
Given the speed at which we're moving on the codebase, we don't assign issues or "give" issues to anyone.
12+
## What should I contribute?
1013

11-
When multiple PRs are submitted for the same issue, we take the one that most succinctly & efficiently solves a given problem and stays within the scope of work.
14+
As we are still in the early days of this project, we recommend [heading over to the Wiki](https://github.com/maybe-finance/maybe/wiki) to get a better idea of _what_ to contribute.
1215

13-
Priority is also generally given to previous committers as they've proven familiarity with the codebase and product.
16+
In general, _full features_ that get us closer to [our Vision](https://github.com/maybe-finance/maybe/wiki/Vision) are the most valuable contributions at this stage.
17+
18+
## Development
19+
20+
### Setup
21+
22+
To get setup for local development, you have two options:
23+
24+
1. [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) with VSCode (see the `.devcontainer` folder)
25+
2. Local Development
26+
- [Mac Setup Guide](https://github.com/maybe-finance/maybe/wiki/Mac-Dev-Setup-Guide)
27+
- [Linux Setup Guide](https://github.com/maybe-finance/maybe/wiki/Linux-Dev-Setup-Guide)
28+
- [Windows Setup Guide](https://github.com/maybe-finance/maybe/wiki/Windows-Dev-Setup-Guide)
29+
30+
### Making a Pull Request
31+
32+
1. Fork the repo
33+
2. Create your feature branch (`git checkout -b my-new-feature`)
34+
3. Commit your changes (`git commit -am 'Add some feature'`)
35+
4. Push to the branch (`git push origin my-new-feature`)
36+
5. Create new Pull Request, and be sure to check the [Allow edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) option while creating your PR. This allows maintainers to collaborate with you on your PR if needed.
37+
6. If possible, [link your pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) by adding the appropriate keyword (e.g. `fixes issue #XXX`)
38+
7. Before requesting a review, please make sure that all [Github Checks](https://docs.github.com/en/rest/checks?apiVersion=2022-11-28) have passed and your branch is up-to-date with the `main` branch. After doing so, request a review and wait for a maintainer's approval.
39+
40+
All PRs should target the `main` branch.

‎Gemfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gem "tailwindcss-rails"
2020

2121
# Hotwire
2222
gem "stimulus-rails"
23-
gem "turbo-rails", github: "hotwired/turbo-rails", branch: "main"
23+
gem "turbo-rails"
2424

2525
# Other
2626
gem "bcrypt", "~> 3.1.7"
@@ -33,7 +33,7 @@ group :development, :test do
3333
gem "debug", platforms: %i[ mri windows ]
3434
gem "brakeman", require: false
3535
gem "rubocop-rails-omakase", require: false
36-
gem "dotenv"
36+
gem "dotenv-rails"
3737
gem "letter_opener"
3838
gem "i18n-tasks"
3939
end

‎Gemfile.lock‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
GIT
2-
remote: https://github.com/hotwired/turbo-rails.git
3-
revision: 3748512710a29b541a1f2b3863cc6fb2422fb7e2
4-
branch: main
5-
specs:
6-
turbo-rails (2.0.0.pre.rc.2)
7-
actionpack (>= 6.0.0)
8-
activejob (>= 6.0.0)
9-
railties (>= 6.0.0)
10-
111
GIT
122
remote: https://github.com/rails/rails.git
13-
revision: 554e5c2d8e8dd9f9e302a2d11c775f14c512d957
3+
revision: f0d433bb46ac233ec7fd7fae48f458978908d905
144
branch: main
155
specs:
166
actioncable (7.2.0.alpha)
@@ -143,6 +133,9 @@ GEM
143133
irb (~> 1.10)
144134
reline (>= 0.3.8)
145135
dotenv (2.8.1)
136+
dotenv-rails (2.8.1)
137+
dotenv (= 2.8.1)
138+
railties (>= 3.2)
146139
drb (2.2.0)
147140
ruby2_keywords
148141
erubi (1.12.0)
@@ -352,6 +345,10 @@ GEM
352345
unicode-display_width (>= 1.1.1, < 3)
353346
thor (1.3.0)
354347
timeout (0.4.1)
348+
turbo-rails (2.0.0)
349+
actionpack (>= 6.0.0)
350+
activejob (>= 6.0.0)
351+
railties (>= 6.0.0)
355352
tzinfo (2.0.6)
356353
concurrent-ruby (~> 1.0)
357354
unicode-display_width (2.5.0)
@@ -384,7 +381,7 @@ DEPENDENCIES
384381
brakeman
385382
capybara
386383
debug
387-
dotenv
384+
dotenv-rails
388385
hotwire-livereload
389386
i18n-tasks
390387
importmap-rails
@@ -402,7 +399,7 @@ DEPENDENCIES
402399
selenium-webdriver
403400
stimulus-rails
404401
tailwindcss-rails
405-
turbo-rails!
402+
turbo-rails
406403
tzinfo-data
407404
web-console
408405

‎Procfile.dev‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
web: bin/rails server
1+
web: bin/rails server -b 0.0.0.0
22
css: bin/rails tailwindcss:watch

‎README.md‎

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,56 +26,65 @@ We're now building the app in Ruby on Rails. We realize that's a controversial c
2626

2727
From the start our focus with this is to make it as easy as possible for you to both contribute to and deploy the app, and this move to Rails is a big part of that.
2828

29-
## Codebase
29+
## Local Development Setup
3030

31-
The codebase is vanilla [Rails](https://rubyonrails.org/) and [Postgres](https://www.postgresql.org/). Quite a simple setup.
31+
### Requirements
3232

33-
## Setup
33+
- Ruby >3 (see `Gemfile`)
34+
- PostgreSQL >9.3 (ideally, latest stable version)
3435

35-
You'll need:
36+
After cloning the repo, the basic setup commands are:
3637

37-
- ruby >3 (specific version is in `Gemfile`)
38-
- postgresql (if using stock `config/database.yml`)
39-
40-
If you prefer devcontainer, this project supports it (entirely optional).
41-
42-
Run the following commands after cloning the repo:
43-
44-
```shell
38+
```sh
4539
cd maybe
4640
cp .env.example .env
4741
bundle install
4842
rails db:setup
4943
bin/dev
5044
```
5145

52-
And visit [http://localhost:3000](http://localhost:3000)
46+
And visit http://localhost:3000 to see the app. You can use the following credentials to log in (generated by DB seed):
47+
48+
Email: user@maybe.local
49+
Password: password
50+
51+
For further instructions, see guides below.
52+
53+
### Setup Guides
54+
55+
#### Dev Container (optional)
56+
57+
This is 100% optional and meant for devs who don't want to worry about installing requirements manually for their platform. You can follow [this guide](https://code.visualstudio.com/docs/devcontainers/containers) to learn more about Dev Containers.
58+
59+
#### Mac
60+
61+
Please visit our [Mac dev setup guide](https://github.com/maybe-finance/maybe/wiki/Mac-Dev-Setup-Guide).
62+
63+
#### Linux
64+
65+
Please visit our [Linux dev setup guide](https://github.com/maybe-finance/maybe/wiki/Linux-Dev-Setup-Guide).
5366

54-
### Email
67+
#### Windows
5568

56-
In development, we use `letter_opener` to automatically open emails in your browser. However, if you self-host, you'll likely want some basic email sending abilities.
69+
Please visit our [Windows dev setup guide](https://github.com/maybe-finance/maybe/wiki/Windows-Dev-Setup-Guide).
5770

58-
You can use any SMTP-based mail service and then simply drop in your SMTP credentials in the `.env` file.
71+
### Testing Emails
5972

60-
[Resend](https://resend.com) is a great option for personal use as they have a very generous free plan.
73+
In development, we use `letter_opener` to automatically open emails in your browser. When an email sends locally, a new browser tab will open with a preview.
6174

6275
## Contributing
6376

6477
Before contributing, you'll likely find it helpful to [understand context and general vision/direction](https://github.com/maybe-finance/maybe/wiki).
6578

66-
It's still very early days for this so your mileage will vary here and lots of things will break.
79+
Once you've done that, please visit our [contributing guide](https://github.com/maybe-finance/maybe/blob/main/CONTRIBUTING.md) to get started!
6780

68-
But almost any contribution will be beneficial at this point. Check the [current Issues](https://github.com/maybe-finance/maybe/issues) to see where you can jump in!
81+
## Self Hosting
6982

70-
If you've got an improvement, just send in a pull request!
83+
Our long term goal is to make self-hosting as easy as possible. That said, during these early stages of building the product, we are focusing our efforts on development.
7184

72-
1. Fork it
73-
2. Create your feature branch (`git checkout -b my-new-feature`)
74-
3. Commit your changes (`git commit -am 'Add some feature'`)
75-
4. Push to the branch (`git push origin my-new-feature`)
76-
5. Create new Pull Request
85+
We will update this section as we get closer to an initial release.
7786

78-
If you've got feature ideas, simply [open a new issue](https://github.com/maybe-finance/maybe/issues/new)!
87+
Please see our [guide on self hosting here](https://github.com/maybe-finance/maybe/wiki/Self-Hosting-Setup-Guide).
7988

8089
## Repo Activity
8190

‎app/helpers/accounts_helper.rb‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
module AccountsHelper
2+
def to_accountable_title(accountable)
3+
accountable.model_name.human
4+
end
25
end

‎app/models/account/investment.rb‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
class Account::Investment < ApplicationRecord
22
include Accountable
3+
4+
SUBTYPES = [
5+
[ "Brokerage", "brokerage" ],
6+
[ "Pension", "pension" ],
7+
[ "Retirement", "retirement" ],
8+
[ "401(k)", "401k" ],
9+
[ "529 plan", "529_plan" ],
10+
[ "Health Savings Account", "hsa" ],
11+
[ "Mutual Fund", "mutual_fund" ],
12+
[ "Roth IRA", "roth_ira" ],
13+
[ "Roth 401k", "roth_401k" ]
14+
].freeze
315
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
2+
<label for="account_name" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Type</label>
3+
<%= f.select :subtype, options_for_select(Account::Investment::SUBTYPES, selected: ""), {}, class: "block w-full p-0 mt-1 bg-transparent border-none focus:outline-none focus:ring-0" %>
4+
</div>

0 commit comments

Comments
 (0)