Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Nov 11, 2023
1 parent 29652cc commit 12a2ee6
Show file tree
Hide file tree
Showing 83 changed files with 239 additions and 238 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# App Configs
APP_NAME=Orangutan
APP_NAME=Moose
APP_PORT=4000
APP_SECRET=76b3tsME0Sixg04dlGsxx48vhJz5EZndgXTUly32vxpsgifl5J/QDZRfe/zv0WSR
APP_HOST=localhost
APP_HTTP_SCHEMA=http

# Database Configs
DB_USERNAME=orangutan
DB_PASSWORD=orangutan
DB_USERNAME=moose
DB_PASSWORD=moose
DB_HOSTNAME=localhost
DB_DATABASE=orangutan_dev
DB_DATABASE=moose_dev
DB_PORT=5432
DB_SSL=off
DB_CA_CERTFILE_PATH=
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
image: postgres:latest
ports: ['5432:5432']
env:
POSTGRES_DB: orangutan_dev
POSTGRES_USER: orangutan
POSTGRES_PASSWORD: orangutan
POSTGRES_DB: moose_dev
POSTGRES_USER: moose
POSTGRES_PASSWORD: moose
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
Expand All @@ -38,11 +38,11 @@ jobs:
- name: Get dependencies
run: make deps

- name: Check orangutan format
- name: Check moose format
run: make fmt_check

- name: Test orangutan
- name: Test moose
run: make ci

- name: Build orangutan
- name: Build moose
run: make build
6 changes: 3 additions & 3 deletions .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").
orangutan-*.tar
moose-*.tar

# Ignore assets that are produced by build tools.
/priv/static/assets/
Expand All @@ -33,9 +33,9 @@ npm-debug.log

/assets/node_modules/

orangutan_test*
moose_test*

orangutan_dev*
moose_dev*

.vscode

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ iex ?= iex

help: Makefile
@echo
@echo " Choose a command run in Orangutan:"
@echo " Choose a command run in Moose:"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
Expand Down Expand Up @@ -67,10 +67,10 @@ migrate:
$(mix) ecto.setup


## run: Run orangutan
## run: Run moose
.PHONY: run
run:
@echo ">> ============= Run orangutan ============= <<"
@echo ">> ============= Run moose ============= <<"
$(mix) phx.server


Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<p align="center">
<img alt="Orangutan Logo" src="/assets/img/logo.png" width="180" />
<h3 align="center">Orangutan</h3>
<img alt="Moose Logo" src="/assets/img/logo.png" width="180" />
<h3 align="center">Moose</h3>
<p align="center">A Disposable, Secure, Anonymous Email Server, Set up in Minutes.</p>
<p align="center">
<a href="https://github.com/Clivern/Orangutan/actions/workflows/ci.yml">
<img src="https://github.com/Clivern/Orangutan/actions/workflows/ci.yml/badge.svg"/>
<a href="https://github.com/Clivern/Moose/actions/workflows/ci.yml">
<img src="https://github.com/Clivern/Moose/actions/workflows/ci.yml/badge.svg"/>
</a>
<a href="https://github.com/Clivern/Orangutan/releases">
<a href="https://github.com/Clivern/Moose/releases">
<img src="https://img.shields.io/badge/Version-0.1.0-1abc9c.svg">
</a>
<a href="https://github.com/Clivern/Orangutan/blob/master/LICENSE">
<a href="https://github.com/Clivern/Moose/blob/master/LICENSE">
<img src="https://img.shields.io/badge/LICENSE-MIT-orange.svg">
</a>
</p>
</p>

Orangutan is a disposable, secure, anonymous email server. It allows to receive email at a temporary address that self-destructed after a certain time elapses. Orangutan is most advanced throwaway email service that helps you avoid spam and stay safe.
Moose is a disposable, secure, anonymous email server. It allows to receive email at a temporary address that self-destructed after a certain time elapses. Moose is most advanced throwaway email service that helps you avoid spam and stay safe.


### Getting Started
Expand Down Expand Up @@ -56,9 +56,9 @@ To run `postgresql` with `docker`

```zsh
$ docker run -itd \
-e POSTGRES_USER=orangutan \
-e POSTGRES_PASSWORD=orangutan \
-e POSTGRES_DB=orangutan_dev \
-e POSTGRES_USER=moose \
-e POSTGRES_PASSWORD=moose \
-e POSTGRES_DB=moose_dev \
-p 5432:5432 \
--name postgresql \
postgres:15.2
Expand All @@ -67,19 +67,19 @@ $ docker run -itd \

### Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, `Orangutan` is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.
For transparency into our release cycle and in striving to maintain backward compatibility, `Moose` is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.

See the [Releases section of our GitHub project](https://github.com/clivern/orangutan/releases) for changelogs for each release version of `Orangutan`. It contains summaries of the most noteworthy changes made in each release. Also see the [Milestones section](https://github.com/clivern/orangutan/milestones) for the future roadmap.
See the [Releases section of our GitHub project](https://github.com/clivern/moose/releases) for changelogs for each release version of `Moose`. It contains summaries of the most noteworthy changes made in each release. Also see the [Milestones section](https://github.com/clivern/moose/milestones) for the future roadmap.


### Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/orangutan/issues
If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/moose/issues


### Security Issues

If you discover a security vulnerability within `Orangutan`, please send an email to [[email protected]](mailto:[email protected])
If you discover a security vulnerability within `Moose`, please send an email to [[email protected]](mailto:[email protected])


### Contributing
Expand All @@ -91,4 +91,4 @@ We are an open source, community-driven project so please feel free to join us.

© 2022, Clivern. Released under [MIT License](https://opensource.org/licenses/mit-license.php).

**Orangutan** is authored and maintained by [@clivern](http://github.com/clivern).
**Moose** is authored and maintained by [@clivern](http://github.com/clivern).
Binary file modified assets/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/js/user_socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Bring in Phoenix channels client library:
import {Socket} from "phoenix"

// And connect to the path in "lib/orangutan_web/endpoint.ex". We pass the
// And connect to the path in "lib/moose_web/endpoint.ex". We pass the
// token for authentication. Read below how it should be used.
let socket = new Socket("/socket", {params: {token: window.userToken}})

Expand All @@ -14,7 +14,7 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
// If the current user exists you can assign the user's token in
// the connection for use in the layout.
//
// In your "lib/orangutan_web/router.ex":
// In your "lib/moose_web/router.ex":
//
// pipeline :browser do
// ...
Expand All @@ -32,12 +32,12 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
// end
//
// Now you need to pass this token to JavaScript. You can do so
// inside a script tag in "lib/orangutan_web/templates/layout/app.html.heex":
// inside a script tag in "lib/moose_web/templates/layout/app.html.heex":
//
// <script>window.userToken = "<%= assigns[:user_token] %>";</script>
//
// You will need to verify the user token in the "connect/3" function
// in "lib/orangutan_web/channels/user_socket.ex":
// in "lib/moose_web/channels/user_socket.ex":
//
// def connect(%{"token" => token}, socket, _connect_info) do
// # max_age: 1209600 is equivalent to two weeks in seconds
Expand Down
12 changes: 6 additions & 6 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# General application configuration
import Config

config :orangutan,
ecto_repos: [Orangutan.Repo]
config :moose,
ecto_repos: [Moose.Repo]

# Configures the endpoint
config :orangutan, OrangutanWeb.Endpoint,
config :moose, MooseWeb.Endpoint,
url: [host: System.get_env("APP_HOST") || "localhost"],
render_errors: [view: OrangutanWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Orangutan.PubSub,
render_errors: [view: MooseWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Moose.PubSub,
live_view: [signing_salt: "/FQ30bq7"]

# Configures the mailer
Expand All @@ -24,7 +24,7 @@ config :orangutan, OrangutanWeb.Endpoint,
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :orangutan, Orangutan.Mailer, adapter: Swoosh.Adapters.Local
config :moose, Moose.Mailer, adapter: Swoosh.Adapters.Local

# Swoosh API client is needed for adapters other than SMTP.
config :swoosh, :api_client, false
Expand Down
18 changes: 9 additions & 9 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Config

# Configure your database
if System.get_env("DB_SSL") || "off" == "on" do
config :orangutan, Orangutan.Repo,
username: System.get_env("DB_USERNAME") || "orangutan",
password: System.get_env("DB_PASSWORD") || "orangutan",
config :moose, Moose.Repo,
username: System.get_env("DB_USERNAME") || "moose",
password: System.get_env("DB_PASSWORD") || "moose",
hostname: System.get_env("DB_HOSTNAME") || "localhost",
database: System.get_env("DB_DATABASE") || "gorilla_dev",
port: String.to_integer(System.get_env("DB_PORT") || "5432"),
Expand All @@ -22,11 +22,11 @@ if System.get_env("DB_SSL") || "off" == "on" do
cacertfile: System.get_env("DB_CA_CERTFILE_PATH") || ""
]
else
config :orangutan, Orangutan.Repo,
username: System.get_env("DB_USERNAME") || "orangutan",
password: System.get_env("DB_PASSWORD") || "orangutan",
config :moose, Moose.Repo,
username: System.get_env("DB_USERNAME") || "moose",
password: System.get_env("DB_PASSWORD") || "moose",
hostname: System.get_env("DB_HOSTNAME") || "localhost",
database: System.get_env("DB_DATABASE") || "orangutan_dev",
database: System.get_env("DB_DATABASE") || "moose_dev",
port: String.to_integer(System.get_env("DB_PORT") || "5432"),
maintenance_database: System.get_env("DB_DATABASE") || "gorilla_dev",
stacktrace: true,
Expand All @@ -41,7 +41,7 @@ end
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with esbuild to bundle .js and .css sources.
config :orangutan, OrangutanWeb.Endpoint,
config :moose, MooseWeb.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: String.to_integer(System.get_env("APP_PORT") || "4000")],
Expand Down Expand Up @@ -79,7 +79,7 @@ config :orangutan, OrangutanWeb.Endpoint,
# different ports.

# Watch static and templates for browser reloading.
config :orangutan, OrangutanWeb.Endpoint,
config :moose, MooseWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
Expand Down
6 changes: 3 additions & 3 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Config
# manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and
# before starting your production server.
config :orangutan, OrangutanWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
config :moose, MooseWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"

# Do not print debug messages in production
config :logger, level: :info
Expand All @@ -19,7 +19,7 @@ config :logger, level: :info
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :orangutan, OrangutanWeb.Endpoint,
# config :moose, MooseWeb.Endpoint,
# ...,
# url: [host: "example.com", port: 443],
# https: [
Expand All @@ -43,7 +43,7 @@ config :logger, level: :info
# We also recommend setting `force_ssl` in your endpoint, ensuring
# no data is ever sent via http, always redirecting to https:
#
# config :orangutan, OrangutanWeb.Endpoint,
# config :moose, MooseWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
12 changes: 6 additions & 6 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ import Config
# If you use `mix release`, you need to explicitly enable the server
# by passing the PHX_SERVER=true when you start it:
#
# PHX_SERVER=true bin/orangutan start
# PHX_SERVER=true bin/moose start
#
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
# script that automatically sets the env var above.
if System.get_env("PHX_SERVER") do
config :orangutan, OrangutanWeb.Endpoint, server: true
config :moose, MooseWeb.Endpoint, server: true
end

if config_env() == :prod do
maybe_ipv6 = if System.get_env("ECTO_IPV6"), do: [:inet6], else: []

if System.get_env("DB_SSL") || "off" == "on" do
config :orangutan, Orangutan.Repo,
config :moose, Moose.Repo,
username: System.get_env("DB_USERNAME"),
password: System.get_env("DB_PASSWORD"),
hostname: System.get_env("DB_HOSTNAME"),
Expand All @@ -43,7 +43,7 @@ if config_env() == :prod do
cacertfile: System.get_env("DB_CA_CERTFILE_PATH") || ""
]
else
config :orangutan, Orangutan.Repo,
config :moose, Moose.Repo,
username: System.get_env("DB_USERNAME"),
password: System.get_env("DB_PASSWORD"),
hostname: System.get_env("DB_HOSTNAME"),
Expand All @@ -69,7 +69,7 @@ if config_env() == :prod do
host = System.get_env("APP_HOST") || "example.com"
port = String.to_integer(System.get_env("APP_PORT") || "4000")

config :orangutan, OrangutanWeb.Endpoint,
config :moose, MooseWeb.Endpoint,
url: [host: host, port: port, scheme: System.get_env("APP_HTTP_SCHEMA") || "http"],
http: [
# Enable IPv6 and bind on all interfaces.
Expand All @@ -87,7 +87,7 @@ if config_env() == :prod do
# Also, you may need to configure the Swoosh API client of your choice if you
# are not using SMTP. Here is an example of the configuration:
#
# config :orangutan, Orangutan.Mailer,
# config :moose, Moose.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")
Expand Down
12 changes: 6 additions & 6 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ import Config
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :orangutan, Orangutan.Repo,
username: "orangutan",
password: "orangutan",
config :moose, Moose.Repo,
username: "moose",
password: "moose",
hostname: "localhost",
database: "orangutan_test#{System.get_env("MIX_TEST_PARTITION")}",
database: "moose_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :orangutan, OrangutanWeb.Endpoint,
config :moose, MooseWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "cBGndC+ZgHOIrWppfj45v3LYq7jFdXov339MuebP6HCEAEscZOUSkgC9y1YIZLmh",
server: false

# In test we don't send emails.
config :orangutan, Orangutan.Mailer, adapter: Swoosh.Adapters.Test
config :moose, Moose.Mailer, adapter: Swoosh.Adapters.Test

# Print only warnings and errors during test
config :logger, level: :warn
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
environment:
PGUSER: root
PGPASSWORD: D1q9f0C2&PEW
PGDATABASE: orangutan
PGDATABASE: moose
PGPORT: 5432
PGHOST: db
restart: unless-stopped
Expand All @@ -18,7 +18,7 @@ services:
db:
image: postgres:16.0
environment:
POSTGRES_DB: orangutan
POSTGRES_DB: moose
POSTGRES_USER: root
POSTGRES_PASSWORD: D1q9f0C2&PEW
restart: unless-stopped
Expand Down
Loading

0 comments on commit 12a2ee6

Please sign in to comment.