Skip to content

Commit

Permalink
🚚 rename to cashubrew
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Sep 26, 2024
1 parent 81ffa2a commit 7da883e
Show file tree
Hide file tree
Showing 52 changed files with 235 additions and 235 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: yourdockerhubusername/gakimint
images: yourdockerhubusername/cashubrew
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ erl_crash.dump
*.ez

# Ignore package tarball (built via "mix hex.build").
gakimint-*.tar
cashubrew-*.tar

# Temporary files, for example, from tests.
/tmp/
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ RUN chown nobody:nobody /app

USER nobody:nobody

COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/gakimint ./
COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/cashubrew ./

ENV HOME=/app
ENV MIX_ENV=prod

# Set default environment variables
ENV PORT=4000
ENV DATABASE_URL=ecto://postgres:postgres@localhost/gakimint_prod
ENV DATABASE_URL=ecto://postgres:postgres@localhost/cashubrew_prod
ENV SECRET_KEY_BASE=changeme

# Expose the port the app runs on
EXPOSE 4000

CMD ["bin/gakimint", "start"]
CMD ["bin/cashubrew", "start"]
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# 🌟 Gakimint: Cashu Mints with Elixir Magic ✨
# 🌟 Cashubrew: Cashu Mints with Elixir Magic ✨

<a href="https://github.com/AbdelStark/gakimint/actions/workflows/ci.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/AbdelStark/gakimint/ci.yml?style=for-the-badge" height=30></a>
<a href="https://github.com/AbdelStark/cashubrew/actions/workflows/ci.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/AbdelStark/cashubrew/ci.yml?style=for-the-badge" height=30></a>
<a href="https://elixir-lang.org/"> <img alt="Elixir" src="https://img.shields.io/badge/elixir-%234B275F.svg?style=for-the-badge&logo=elixir&logoColor=white" height=30></a>
<a href="https://bitcoin.org/"> <img alt="Bitcoin" src="https://img.shields.io/badge/Bitcoin-000?style=for-the-badge&logo=bitcoin&logoColor=white" height=30></a>
<a href="https://lightning.network/"><img src="https://img.shields.io/badge/Ligthning Network-000.svg?&style=for-the-badge&logo=data:image/svg%2bxml;base64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIEZpcmV3b3JrcyAxMCwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0%2BDQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyBpZD0iYml0Y29pbl9saWdodG5pbmdfaWNvbi5mdy1QYWdlJTIwMSIgdmlld0JveD0iMCAwIDI4MCAyODAiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgdmVyc2lvbj0iMS4xIg0KCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQoJeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyODBweCIgaGVpZ2h0PSIyODBweCINCj4NCgk8cGF0aCBpZD0iRWxsaXBzZSIgZD0iTSA3IDE0MC41IEMgNyA2Ni43NjkgNjYuNzY5IDcgMTQwLjUgNyBDIDIxNC4yMzEgNyAyNzQgNjYuNzY5IDI3NCAxNDAuNSBDIDI3NCAyMTQuMjMxIDIxNC4yMzEgMjc0IDE0MC41IDI3NCBDIDY2Ljc2OSAyNzQgNyAyMTQuMjMxIDcgMTQwLjUgWiIgZmlsbD0iI2Y3OTMxYSIvPg0KCTxwYXRoIGQ9Ik0gMTYxLjE5NDMgNTEuNSBDIDE1My4yMzQ5IDcyLjE2MDcgMTQ1LjI3NTYgOTQuNDEwNyAxMzUuNzI0NCAxMTYuNjYwNyBDIDEzNS43MjQ0IDExNi42NjA3IDEzNS43MjQ0IDExOS44MzkzIDEzOC45MDgxIDExOS44MzkzIEwgMjA0LjE3NDcgMTE5LjgzOTMgQyAyMDQuMTc0NyAxMTkuODM5MyAyMDQuMTc0NyAxMjEuNDI4NiAyMDUuNzY2NyAxMjMuMDE3OSBMIDExMC4yNTQ1IDIyOS41IEMgMTA4LjY2MjYgMjI3LjkxMDcgMTA4LjY2MjYgMjI2LjMyMTQgMTA4LjY2MjYgMjI0LjczMjEgTCAxNDIuMDkxOSAxNTMuMjE0MyBMIDE0Mi4wOTE5IDE0Ni44NTcxIEwgNzUuMjMzMyAxNDYuODU3MSBMIDc1LjIzMzMgMTQwLjUgTCAxNTYuNDE4NyA1MS41IEwgMTYxLjE5NDMgNTEuNSBaIiBmaWxsPSIjZmZmZmZmIi8%2BDQo8L3N2Zz4%3D" alt="Bitcoin Lightning" height="30"></a>

> 💡 Gakimint: Where Elixir meets Cashu, creating a symphony of secure, scalable, and lightning-fast ecash transactions!
> 💡 Cashubrew: Where Elixir meets Cashu, creating a symphony of secure, scalable, and lightning-fast ecash transactions!
> ⚠️ Disclaimer: This is a proof of concept and is not ready for production use.
## 📚 Learn about Cashu

Before diving into Gakimint, it's essential to understand Cashu.
Before diving into Cashubrew, it's essential to understand Cashu.

Cashu is a free and open-source Chaumian ecash protocol built for [Bitcoin](https://bitcoin.org/bitcoin.pdf).

Expand All @@ -23,17 +23,17 @@ To learn more about Cashu:
- 🔍 [Cashu Documentation](https://docs.cashu.space/): Comprehensive guide to understanding and implementing Cashu.
- 🎨 [Cashu Visual Explainer](https://lconf.gandlaf.com/): An interactive visual guide to help you grasp Cashu concepts.

Understanding Cashu will help you appreciate the magic behind Gakimint and contribute more effectively to the project!
Understanding Cashu will help you appreciate the magic behind Cashubrew and contribute more effectively to the project!

## 🚀 Quick Start

Embark on your Gakimint journey with these simple steps:
Embark on your Cashubrew journey with these simple steps:

1. **Clone the Treasure Map**

```bash
git clone https://github.com/AbdelStark/gakimint.git
cd gakimint
git clone https://github.com/AbdelStark/cashubrew.git
cd cashubrew
```

2. **Summon the Dependencies**
Expand All @@ -59,7 +59,7 @@ Embark on your Gakimint journey with these simple steps:

## 🎭 Running the Show

Launch your Gakimint server with a single command:
Launch your Cashubrew server with a single command:

```bash
mix phx.server
Expand All @@ -69,29 +69,29 @@ mix phx.server

## 🧙‍♂️ Wallet CLI Magic

Interact with your Gakimint instance using the Wallet CLI:
Interact with your Cashubrew instance using the Wallet CLI:

1. **Mint Tokens**

To mint 42 tokens:

```bash
mix run -e 'Gakimint.Wallet.CLI.main(["mint", "42"])'
mix run -e 'Cashubrew.Wallet.CLI.main(["mint", "42"])'
```

2. **Check Balance**

To view your current balance:

```bash
mix run -e 'Gakimint.Wallet.CLI.main(["balance"])'
mix run -e 'Cashubrew.Wallet.CLI.main(["balance"])'
```

These commands allow you to interact with your Gakimint instance directly from the command line, making it easy to test and manage your ecash transactions.
These commands allow you to interact with your Cashubrew instance directly from the command line, making it easy to test and manage your ecash transactions.

## 🔮 Conjuring the Release Binary

Harness the full power of Gakimint by creating a production-ready release binary:
Harness the full power of Cashubrew by creating a production-ready release binary:

1. **Craft the Magical Artifact**

Expand All @@ -105,12 +105,12 @@ Harness the full power of Gakimint by creating a production-ready release binary

2. **Unleash the Magic**

To bring your Gakimint release to life, chant the following:
To bring your Cashubrew release to life, chant the following:

```bash
SECRET_KEY_BASE=$(mix phx.gen.secret) \
DATABASE_URL="ecto://postgres:postgres@localhost/gakimint_dev" \
_build/prod/rel/gakimint/bin/gakimint start
DATABASE_URL="ecto://postgres:postgres@localhost/cashubrew_dev" \
_build/prod/rel/cashubrew/bin/cashubrew start
```

Adjust the `DATABASE_URL` as needed for your mystical realm.
Expand All @@ -119,7 +119,7 @@ Harness the full power of Gakimint by creating a production-ready release binary

3. **Customizing Your Magical Realm**

Fine-tune your Gakimint instance by adjusting these mystic variables:
Fine-tune your Cashubrew instance by adjusting these mystic variables:
- `SECRET_KEY_BASE`: The secret key for your realm. Generate a new one for each deployment.
- `DATABASE_URL`: The sacred text to connect to your data vault.
- `PORT`: The gateway through which users will access your mint (default: 4000).
Expand All @@ -128,12 +128,12 @@ Harness the full power of Gakimint by creating a production-ready release binary

```bash
SECRET_KEY_BASE=$(mix phx.gen.secret) \
DATABASE_URL="ecto://username:password@localhost/gakimint_prod" \
DATABASE_URL="ecto://username:password@localhost/cashubrew_prod" \
PORT=8080 \
_build/prod/rel/gakimint/bin/gakimint start
_build/prod/rel/cashubrew/bin/cashubrew start
```

May your Gakimint instance thrive and bring forth a new era of magical transactions! 🌟
May your Cashubrew instance thrive and bring forth a new era of magical transactions! 🌟

## 🛠️ Developer's Toolkit

Expand Down Expand Up @@ -181,25 +181,25 @@ Run these spells regularly to keep your code base clean and secure!

## 🐳 Docker Deployment

Sail the high seas with Gakimint in a Docker container:
Sail the high seas with Cashubrew in a Docker container:

1. **Build your ship**:

```bash
docker build -t gakimint:latest .
docker build -t cashubrew:latest .
```

2. **Set sail**:

```bash
docker run \
--name gakimint \
--name cashubrew \
--network host \
-e DATABASE_URL="ecto://postgres:postgres@localhost/gakimint_dev" \
-e DATABASE_URL="ecto://postgres:postgres@localhost/cashubrew_dev" \
-e SECRET_KEY_BASE=$(mix phx.gen.secret) \
-e PORT=4000 \
-e MIX_ENV=prod \
gakimint:latest
cashubrew:latest
```

Adjust the `DATABASE_URL` and other environment variables as needed for your voyage.
Expand Down Expand Up @@ -252,13 +252,13 @@ Here's a table of the currently supported optional NUTs:
| [NUT-16](https://cashubtc.github.io/nuts/16/) | Animated QR codes | |
| [NUT-17](https://cashubtc.github.io/nuts/17/) | WebSocket subscriptions | |
## 🤝 Join the Gakimint Community
## 🤝 Join the Cashubrew Community
We're always looking for fellow wizards to join our quest. Check out our [contribution guidelines](docs/CONTRIBUTING.md) and let's make magic together!
## 📜 License
Gakimint is released under the MIT License. See the [LICENSE](LICENSE) file for more details.
Cashubrew is released under the MIT License. See the [LICENSE](LICENSE) file for more details.
---
Expand All @@ -267,5 +267,5 @@ Gakimint is released under the MIT License. See the [LICENSE](LICENSE) file for
</p>
<p align="center">
<a href="https://github.com/AbdelStark/gakimint/stargazers">⭐ Star us on GitHub!</a>
<a href="https://github.com/AbdelStark/cashubrew/stargazers">⭐ Star us on GitHub!</a>
</p>
12 changes: 6 additions & 6 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import Config

config :gakimint,
ecto_repos: [Gakimint.Repo],
config :cashubrew,
ecto_repos: [Cashubrew.Repo],
generators: [binary_id: true]

# Configures the endpoint
config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
url: [host: "localhost"],
render_errors: [
formats: [json: Gakimint.Web.ErrorJSON],
formats: [json: Cashubrew.Web.ErrorJSON],
layout: false
],
pubsub_server: Gakimint.PubSub,
live_view: [signing_salt: "gakimint_live_view_signing_salt"]
pubsub_server: Cashubrew.PubSub,
live_view: [signing_salt: "cashubrew_live_view_signing_salt"]

# Configures Elixir's Logger
config :logger, :console,
Expand Down
16 changes: 8 additions & 8 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Config

config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
# Binding to loopback ipv4 address prevents access from other machines.
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
http: [ip: {127, 0, 0, 1}, port: 4000],
Expand All @@ -11,15 +11,15 @@ config :gakimint, Gakimint.Web.Endpoint,
watchers: []

# Watch static and templates for browser reloading.
config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
live_reload: [
patterns: [
~r"lib/gakimint/web/(controllers|live|components)/.*(ex|heex)$"
~r"lib/cashubrew/web/(controllers|live|components)/.*(ex|heex)$"
]
]

# Enable dev routes for dashboard and mailbox
config :gakimint, dev_routes: true
config :cashubrew, dev_routes: true

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
Expand All @@ -31,14 +31,14 @@ config :phoenix, :stacktrace_depth, 20
# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime

config :gakimint, Gakimint.Repo,
database: "gakimint_dev",
config :cashubrew, Cashubrew.Repo,
database: "cashubrew_dev",
username: "postgres",
password: "postgres",
hostname: "localhost",
port: 5432,
pool_size: 10

config :gakimint, :repo, Gakimint.Repo
config :cashubrew, :repo, Cashubrew.Repo

config :gakimint, ecto_repos: [Gakimint.Repo]
config :cashubrew, ecto_repos: [Cashubrew.Repo]
8 changes: 4 additions & 4 deletions config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Config

config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
url: [
host: System.get_env("APP_HOST", "localhost"),
port: String.to_integer(System.get_env("PORT", "4000"))
Expand All @@ -9,15 +9,15 @@ config :gakimint, Gakimint.Web.Endpoint,
cache_static_manifest: "priv/static/cache_manifest.json",
server: true

config :gakimint, Gakimint.Repo,
config :cashubrew, Cashubrew.Repo,
url: System.get_env("DATABASE_URL"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")

config :gakimint, :repo, Gakimint.Repo
config :cashubrew, :repo, Cashubrew.Repo

config :logger, level: :info

config :gakimint, Gakimint.Web.Endpoint, secret_key_base: System.get_env("SECRET_KEY_BASE")
config :cashubrew, Cashubrew.Web.Endpoint, secret_key_base: System.get_env("SECRET_KEY_BASE")

# Do not print debug messages in production
config :logger, level: :info
6 changes: 3 additions & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ if config_env() == :prod do
For example: ecto://USER:PASS@HOST/DATABASE
"""

config :gakimint, Gakimint.Repo,
config :cashubrew, Cashubrew.Repo,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")

config :gakimint, :repo, Gakimint.Repo
config :cashubrew, :repo, Cashubrew.Repo

secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
Expand All @@ -21,7 +21,7 @@ if config_env() == :prod do
You can generate one by calling: mix phx.gen.secret
"""

config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
http: [
port: String.to_integer(System.get_env("PORT") || "4000"),
transport_options: [socket_opts: [:inet6]]
Expand Down
10 changes: 5 additions & 5 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Config

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :gakimint, Gakimint.Web.Endpoint,
config :cashubrew, Cashubrew.Web.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "your_secret_key_base_for_tests",
server: false
Expand All @@ -15,15 +15,15 @@ config :phoenix, :plug_init_mode, :runtime

# Use mock repo if MOCK_DB environment variable is set to "true"
if System.get_env("MOCK_DB") == "true" do
config :gakimint, :repo, Gakimint.MockRepo
config :cashubrew, :repo, Cashubrew.MockRepo
else
config :gakimint, Gakimint.Repo,
config :cashubrew, Cashubrew.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "gakimint_test#{System.get_env("MIX_TEST_PARTITION")}",
database: "cashubrew_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10

config :gakimint, :repo, Gakimint.Repo
config :cashubrew, :repo, Cashubrew.Repo
end
Loading

0 comments on commit 7da883e

Please sign in to comment.