Skip to content

Commit

Permalink
misc: update wiki (getlago#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrocolic authored Jun 1, 2022
1 parent b5ef944 commit 641fe02
Showing 1 changed file with 8 additions and 54 deletions.
62 changes: 8 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,21 @@
# Lago API

## Local Environment Configuration
Lago is an open-source Stripe Billing alternative.

- Install [rbenv](https://github.com/rbenv/rbenv)
```shell
# Ubuntu
sudo apt install rbenv
This library will allow you to build an entire billing logic from scratch, even the most complex one. Lago is a real-time event-based library made for usage-based billing, subscription-based billing, and all the nuances of pricing in between.

# macOS
brew install rbenv
brew install libpq
## Documentation

rbenv init
# close and re-open your terminal
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
rbenv install 3.0.1
rbenv global 3.0.1
```

- Install project dependencies
```shell
gem install bundler
bundle install
```
- Create a file named `config/master.key`, get the value for it into [1Password](https://start.1password.com/open/i?a=CV2K6WPYLZBXXGIKIUYUJOA3Z4&v=4k453pfxong4lipf3oookha7ei&i=kc2v2trpahmnzcl5k3krdl2z3y&h=my.1password.com)
```shell
touch ./config/master.key
```
- Copy the `.env.dist` to `.env`
```shell
cp .env.dist .env
```

- Install Rubocop locally (required for all developers)
```shell
gem install rubocop rubocop-rspec rubocop-performance rubocop-rails rubocop-thread_safety
```

- Start the database by running `docker-compose up db`
- Prepare the database and run migrations
```shell
rake db:setup
rake db:migrate
```

- Launch the server
```shell
rails s
```

## GraphQL

### Generate GraphQL Schema

- You need to regenerate the schema each time you change something about GraphQL, if you don't, it will make your specs fail.
```shell
$ rake graphql:schema:dump
```
The official Lago documentation is available here : https://doc.getlago.com

## Contributing

The contribution documentation is available [here](https://github.com/getlago/lago-api/blob/main/CONTRIBUTING.md)

## Development Environment

Check the wiki [guide](https://github.com/getlago/lago-api/wiki)

## License

Lago is distributed under [AGPL-3.0](LICENSE).

0 comments on commit 641fe02

Please sign in to comment.