Skip to content

Commit

Permalink
rename to peach
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Oct 2, 2024
1 parent 1e278c9 commit be447ca
Show file tree
Hide file tree
Showing 32 changed files with 142 additions and 138 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Venuela Monorepo
# Peach Monorepo

Venuela is a next-generation event ticketing platform leveraging blockchain technology for secure, transparent, and efficient ticket management.
Peach is a next-generation event ticketing platform leveraging blockchain technology for secure, transparent, and efficient ticket management.

## Project Structure

This monorepo contains the following components:

- `backend/`: Elixir backend using Phoenix framework
- `onchain/`: Starknet smart contracts implemented in Cairo
- `app/`: Venuela main application
- `website/`: Venuela website
- `app/`: Peach main application
- `website/`: Peach website

## Getting Started

Expand All @@ -26,8 +26,8 @@ This monorepo contains the following components:
1. Clone the repository:

```bash
git clone https://github.com/keep-starknet-strange/venuela.git
cd venuela
git clone https://github.com/keep-starknet-strange/peach.git
cd peach
```

2. Follow the README instructions in each component directory to set up and run the different parts of the project.
Expand Down
4 changes: 2 additions & 2 deletions app/app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "venuela",
"slug": "venuela",
"name": "peach",
"slug": "peach",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
Expand Down
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "venuela",
"name": "peach",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ erl_crash.dump
/tmp/

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

2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VenuelaBackend
# PeachBackend

To start your Phoenix server:

Expand Down
12 changes: 6 additions & 6 deletions backend/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
# General application configuration
import Config

config :venuela_backend,
ecto_repos: [VenuelaBackend.Repo],
config :peach_backend,
ecto_repos: [PeachBackend.Repo],
generators: [timestamp_type: :utc_datetime]

# Configures the endpoint
config :venuela_backend, VenuelaBackendWeb.Endpoint,
config :peach_backend, PeachBackendWeb.Endpoint,
url: [host: "localhost"],
adapter: Bandit.PhoenixAdapter,
render_errors: [
formats: [json: VenuelaBackendWeb.ErrorJSON],
formats: [json: PeachBackendWeb.ErrorJSON],
layout: false
],
pubsub_server: VenuelaBackend.PubSub,
pubsub_server: PeachBackend.PubSub,
live_view: [signing_salt: "41pzaInh"]

# Configures the mailer
Expand All @@ -29,7 +29,7 @@ config :venuela_backend, VenuelaBackendWeb.Endpoint,
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :venuela_backend, VenuelaBackend.Mailer, adapter: Swoosh.Adapters.Local
config :peach_backend, PeachBackend.Mailer, adapter: Swoosh.Adapters.Local

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

# Configure your database
config :venuela_backend, VenuelaBackend.Repo,
config :peach_backend, PeachBackend.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "venuela_backend_dev",
database: "peach_backend_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10
Expand All @@ -16,7 +16,7 @@ config :venuela_backend, VenuelaBackend.Repo,
# The watchers configuration can be used to run external
# watchers to your application. For example, we can use it
# to bundle .js and .css sources.
config :venuela_backend, VenuelaBackendWeb.Endpoint,
config :peach_backend, PeachBackendWeb.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 Down Expand Up @@ -50,7 +50,7 @@ config :venuela_backend, VenuelaBackendWeb.Endpoint,
# different ports.

# Enable dev routes for dashboard and mailbox
config :venuela_backend, dev_routes: true
config :peach_backend, dev_routes: true

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Config

# Configures Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: VenuelaBackend.Finch
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: PeachBackend.Finch

# Disable Swoosh Local Memory Storage
config :swoosh, local: false
Expand Down
16 changes: 8 additions & 8 deletions backend/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ 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/venuela_backend start
# PHX_SERVER=true bin/peach_backend 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 :venuela_backend, VenuelaBackendWeb.Endpoint, server: true
config :peach_backend, PeachBackendWeb.Endpoint, server: true
end

if config_env() == :prod do
Expand All @@ -30,7 +30,7 @@ if config_env() == :prod do

maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []

config :venuela_backend, VenuelaBackend.Repo,
config :peach_backend, PeachBackend.Repo,
# ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
Expand All @@ -51,9 +51,9 @@ if config_env() == :prod do
host = System.get_env("PHX_HOST") || "example.com"
port = String.to_integer(System.get_env("PORT") || "4000")

config :venuela_backend, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
config :peach_backend, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")

config :venuela_backend, VenuelaBackendWeb.Endpoint,
config :peach_backend, PeachBackendWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
http: [
# Enable IPv6 and bind on all interfaces.
Expand All @@ -70,7 +70,7 @@ if config_env() == :prod do
# To get SSL working, you will need to add the `https` key
# to your endpoint configuration:
#
# config :venuela_backend, VenuelaBackendWeb.Endpoint,
# config :peach_backend, PeachBackendWeb.Endpoint,
# https: [
# ...,
# port: 443,
Expand All @@ -92,7 +92,7 @@ if config_env() == :prod do
# We also recommend setting `force_ssl` in your config/prod.exs,
# ensuring no data is ever sent via http, always redirecting to https:
#
# config :venuela_backend, VenuelaBackendWeb.Endpoint,
# config :peach_backend, PeachBackendWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
Expand All @@ -103,7 +103,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 :venuela_backend, VenuelaBackend.Mailer,
# config :peach_backend, PeachBackend.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")
Expand Down
8 changes: 4 additions & 4 deletions backend/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 :venuela_backend, VenuelaBackend.Repo,
config :peach_backend, PeachBackend.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "venuela_backend_test#{System.get_env("MIX_TEST_PARTITION")}",
database: "peach_backend_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :venuela_backend, VenuelaBackendWeb.Endpoint,
config :peach_backend, PeachBackendWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "CivUWocGsceVtejxam3MT7w51Q9/UYNArM8wNwrYadEaRWhP39NuT/O9uI5SMbRq",
server: false

# In test we don't send emails
config :venuela_backend, VenuelaBackend.Mailer, adapter: Swoosh.Adapters.Test
config :peach_backend, PeachBackend.Mailer, adapter: Swoosh.Adapters.Test

# Disable swoosh api client as it is only required for production adapters
config :swoosh, :api_client, false
Expand Down
6 changes: 3 additions & 3 deletions backend/infra/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: "3.8"
services:
postgres:
image: postgres:17
container_name: venuela_postgres
container_name: peach_postgres
environment:
POSTGRES_DB: venuela
POSTGRES_DB: peach
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
Expand All @@ -15,7 +15,7 @@ services:

pgadmin:
image: dpage/pgadmin4
container_name: venuela_pgadmin
container_name: peach_pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
Expand Down
4 changes: 2 additions & 2 deletions backend/lib/venuela_backend.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule VenuelaBackend do
defmodule PeachBackend do
@moduledoc """
VenuelaBackend keeps the contexts that define your domain
PeachBackend keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
Expand Down
22 changes: 11 additions & 11 deletions backend/lib/venuela_backend/application.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule VenuelaBackend.Application do
defmodule PeachBackend.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
Expand All @@ -8,29 +8,29 @@ defmodule VenuelaBackend.Application do
@impl true
def start(_type, _args) do
children = [
VenuelaBackendWeb.Telemetry,
VenuelaBackend.Repo,
{DNSCluster, query: Application.get_env(:venuela_backend, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: VenuelaBackend.PubSub},
PeachBackendWeb.Telemetry,
PeachBackend.Repo,
{DNSCluster, query: Application.get_env(:peach_backend, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: PeachBackend.PubSub},
# Start the Finch HTTP client for sending emails
{Finch, name: VenuelaBackend.Finch},
# Start a worker by calling: VenuelaBackend.Worker.start_link(arg)
# {VenuelaBackend.Worker, arg},
{Finch, name: PeachBackend.Finch},
# Start a worker by calling: PeachBackend.Worker.start_link(arg)
# {PeachBackend.Worker, arg},
# Start to serve requests, typically the last entry
VenuelaBackendWeb.Endpoint
PeachBackendWeb.Endpoint
]

# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: VenuelaBackend.Supervisor]
opts = [strategy: :one_for_one, name: PeachBackend.Supervisor]
Supervisor.start_link(children, opts)
end

# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
@impl true
def config_change(changed, _new, removed) do
VenuelaBackendWeb.Endpoint.config_change(changed, removed)
PeachBackendWeb.Endpoint.config_change(changed, removed)
:ok
end
end
4 changes: 2 additions & 2 deletions backend/lib/venuela_backend/mailer.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defmodule VenuelaBackend.Mailer do
use Swoosh.Mailer, otp_app: :venuela_backend
defmodule PeachBackend.Mailer do
use Swoosh.Mailer, otp_app: :peach_backend
end
4 changes: 2 additions & 2 deletions backend/lib/venuela_backend/repo.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule VenuelaBackend.Repo do
defmodule PeachBackend.Repo do
use Ecto.Repo,
otp_app: :venuela_backend,
otp_app: :peach_backend,
adapter: Ecto.Adapters.Postgres
end
16 changes: 8 additions & 8 deletions backend/lib/venuela_backend_web.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
defmodule VenuelaBackendWeb do
defmodule PeachBackendWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, components, channels, and so on.
This can be used in your application as:
use VenuelaBackendWeb, :controller
use VenuelaBackendWeb, :html
use PeachBackendWeb, :controller
use PeachBackendWeb, :html
The definitions below will be executed for every controller,
component, etc, so keep them short and clean, focused
Expand Down Expand Up @@ -39,10 +39,10 @@ defmodule VenuelaBackendWeb do
quote do
use Phoenix.Controller,
formats: [:html, :json],
layouts: [html: VenuelaBackendWeb.Layouts]
layouts: [html: PeachBackendWeb.Layouts]

import Plug.Conn
import VenuelaBackendWeb.Gettext
import PeachBackendWeb.Gettext

unquote(verified_routes())
end
Expand All @@ -51,9 +51,9 @@ defmodule VenuelaBackendWeb do
def verified_routes do
quote do
use Phoenix.VerifiedRoutes,
endpoint: VenuelaBackendWeb.Endpoint,
router: VenuelaBackendWeb.Router,
statics: VenuelaBackendWeb.static_paths()
endpoint: PeachBackendWeb.Endpoint,
router: PeachBackendWeb.Router,
statics: PeachBackendWeb.static_paths()
end
end

Expand Down
2 changes: 1 addition & 1 deletion backend/lib/venuela_backend_web/controllers/error_json.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule VenuelaBackendWeb.ErrorJSON do
defmodule PeachBackendWeb.ErrorJSON do
@moduledoc """
This module is invoked by your endpoint in case of errors on JSON requests.
Expand Down
Loading

0 comments on commit be447ca

Please sign in to comment.