Rename to myco
This commit is contained in:
parent
132fb52358
commit
e97928de36
18
.env
18
.env
@ -1,17 +1,17 @@
|
|||||||
DATABASE_NAME=bazzar
|
DATABASE_NAME=myco
|
||||||
DATABASE_URL=postgres://postgres@localhost/bazzar
|
DATABASE_URL=postgres://postgres@localhost/myco
|
||||||
ACCOUNT_DATABASE_URL=postgres://postgres@localhost/bazzar_accounts
|
ACCOUNT_DATABASE_URL=postgres://postgres@localhost/myco_accounts
|
||||||
CART_DATABASE_URL=postgres://postgres@localhost/bazzar_carts
|
CART_DATABASE_URL=postgres://postgres@localhost/myco_carts
|
||||||
STOCK_DATABASE_URL=postgres://postgres@localhost/bazzar_stocks
|
STOCK_DATABASE_URL=postgres://postgres@localhost/myco_stocks
|
||||||
ORDER_DATABASE_URL=postgres://postgres@localhost/bazzar_orders
|
ORDER_DATABASE_URL=postgres://postgres@localhost/myco_orders
|
||||||
TOKEN_DATABASE_URL=postgres://postgres@localhost/bazzar_tokens
|
TOKEN_DATABASE_URL=postgres://postgres@localhost/myco_tokens
|
||||||
|
|
||||||
PASS_SALT=18CHwV7eGFAea16z+qMKZg
|
PASS_SALT=18CHwV7eGFAea16z+qMKZg
|
||||||
RUST_LOG=debug
|
RUST_LOG=debug
|
||||||
SESSION_SECRET="NEPJs#8jjn8SK8GC7QEC^*P844UgsyEbQB8mRWXkT%3mPrwewZoc25MMby9H#R*w2KzaQgMkk#Pif$kxrLy*N5L!Ch%jxbWoa%gb"
|
SESSION_SECRET="NEPJs#8jjn8SK8GC7QEC^*P844UgsyEbQB8mRWXkT%3mPrwewZoc25MMby9H#R*w2KzaQgMkk#Pif$kxrLy*N5L!Ch%jxbWoa%gb"
|
||||||
JWT_SECRET="42^iFq&ZnQbUf!hwGWXd&CpyY6QQyJmkPU%esFCvne5&Ejcb3nJ4&GyHZp!MArZLf^9*5c6!!VgM$iZ8T%d#&bWTi&xbZk2S@4RN"
|
JWT_SECRET="42^iFq&ZnQbUf!hwGWXd&CpyY6QQyJmkPU%esFCvne5&Ejcb3nJ4&GyHZp!MArZLf^9*5c6!!VgM$iZ8T%d#&bWTi&xbZk2S@4RN"
|
||||||
SIGNATURE=David
|
SIGNATURE=David
|
||||||
SERVICE_NAME="BaZZaR develop"
|
SERVICE_NAME="myco develop"
|
||||||
|
|
||||||
PGDATESTYLE=
|
PGDATESTYLE=
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ PAYU_CLIENT_MERCHANT_ID=300746
|
|||||||
TPAY_TRANSACTION_API_KEY=75f86137a6635df826e3efe2e66f7c9a946fdde1
|
TPAY_TRANSACTION_API_KEY=75f86137a6635df826e3efe2e66f7c9a946fdde1
|
||||||
TPAY_CARDS_API_KEY=bda5eda723bf1ae71a82e90a249803d3f852248d
|
TPAY_CARDS_API_KEY=bda5eda723bf1ae71a82e90a249803d3f852248d
|
||||||
|
|
||||||
#WEB_HOST=https://bazzar.ita-prog.pl
|
#WEB_HOST=https://myco.ita-prog.pl
|
||||||
WEB_HOST=0.0.0.0
|
WEB_HOST=0.0.0.0
|
||||||
|
|
||||||
FILES_PUBLIC_PATH=/files
|
FILES_PUBLIC_PATH=/files
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
# Bazzar
|
# MycoCraft
|
||||||
|
|
||||||
|
Short `Myco` is Rust e-commerce design for possibility to have monolith or microservices, fast, safe, cheap and extensible with plugins e-commerce.
|
||||||
|
|
||||||
|
Origin of the name is Myco-heterotrophy which is symbiotic relationship between fungus and plans which benefits both.
|
||||||
|
|
||||||
### Order life cycle
|
### Order life cycle
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bazzar"
|
name = "myco"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Bazzar</title>
|
<title>Myco</title>
|
||||||
<style>
|
<style>
|
||||||
@import url(https://fonts.googleapis.com/css?family=Questrial);
|
@import url(https://fonts.googleapis.com/css?family=Questrial);
|
||||||
@import url(https://fonts.googleapis.com/css?family=Arvo);
|
@import url(https://fonts.googleapis.com/css?family=Arvo);
|
||||||
|
@ -8,7 +8,7 @@ pub trait ResolveDbUrl {
|
|||||||
fn db_url(&self) -> String {
|
fn db_url(&self) -> String {
|
||||||
self.own_db_url()
|
self.own_db_url()
|
||||||
.or_else(|| std::env::var("DATABASE_URL").ok())
|
.or_else(|| std::env::var("DATABASE_URL").ok())
|
||||||
.unwrap_or_else(|| String::from("postgres://postgres@localhost/bazzar"))
|
.unwrap_or_else(|| String::from("postgres://postgres@localhost/myco"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ impl Example for WebConfig {
|
|||||||
fn example() -> Self {
|
fn example() -> Self {
|
||||||
Self {
|
Self {
|
||||||
host: Some("https://your.comain.com".into()),
|
host: Some("https://your.comain.com".into()),
|
||||||
pass_salt: Some("Generate it with bazzar generate-hash".into()),
|
pass_salt: Some("Generate it with myco generate-hash".into()),
|
||||||
session_secret: Some("100 characters long random string".into()),
|
session_secret: Some("100 characters long random string".into()),
|
||||||
jwt_secret: Some("100 characters long random string".into()),
|
jwt_secret: Some("100 characters long random string".into()),
|
||||||
bind: Some("0.0.0.0".into()),
|
bind: Some("0.0.0.0".into()),
|
||||||
port: Some(8080),
|
port: Some(8080),
|
||||||
signature: Some("John Doe".into()),
|
signature: Some("John Doe".into()),
|
||||||
service_name: Some("bazzar".into()),
|
service_name: Some("myco".into()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ impl WebConfig {
|
|||||||
self.bind
|
self.bind
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.cloned()
|
.cloned()
|
||||||
.or_else(|| std::env::var("BAZZAR_BIND").ok())
|
.or_else(|| std::env::var("myco_BIND").ok())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_bind<S: Into<String>>(&mut self, bind: S) {
|
pub fn set_bind<S: Into<String>>(&mut self, bind: S) {
|
||||||
@ -135,7 +135,7 @@ impl WebConfig {
|
|||||||
|
|
||||||
pub fn port(&self) -> Option<u16> {
|
pub fn port(&self) -> Option<u16> {
|
||||||
self.port.as_ref().copied().or_else(|| {
|
self.port.as_ref().copied().or_else(|| {
|
||||||
std::env::var("BAZZAR_PORT")
|
std::env::var("myco_PORT")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|s| s.parse::<u16>().ok())
|
.and_then(|s| s.parse::<u16>().ok())
|
||||||
})
|
})
|
||||||
@ -215,7 +215,7 @@ pub struct DatabaseConfig {
|
|||||||
impl Example for DatabaseConfig {
|
impl Example for DatabaseConfig {
|
||||||
fn example() -> Self {
|
fn example() -> Self {
|
||||||
Self {
|
Self {
|
||||||
url: Some("postgres://postgres@localhost/bazzar".into()),
|
url: Some("postgres://postgres@localhost/myco".into()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ impl Default for FilesConfig {
|
|||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
public_path: Some("/uploads".into()),
|
public_path: Some("/uploads".into()),
|
||||||
local_path: Some("/var/local/bazzar".into()),
|
local_path: Some("/var/local/myco".into()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ impl FilesConfig {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.cloned()
|
.cloned()
|
||||||
.or_else(|| std::env::var("FILES_LOCAL_PATH").ok())
|
.or_else(|| std::env::var("FILES_LOCAL_PATH").ok())
|
||||||
.unwrap_or_else(|| "/var/local/bazzar".into())
|
.unwrap_or_else(|| "/var/local/myco".into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ impl Default for AccountManagerConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1883,
|
mqtt_port: 1883,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_accounts".into(),
|
database_url: "postgres://postgres@localhost/myco_accounts".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,7 +395,7 @@ impl Default for CartManagerConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1884,
|
mqtt_port: 1884,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_carts".into(),
|
database_url: "postgres://postgres@localhost/myco_carts".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -427,7 +427,7 @@ impl Default for EmailSenderConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1885,
|
mqtt_port: 1885,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_emails".into(),
|
database_url: "postgres://postgres@localhost/myco_emails".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ impl Default for StocksConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1886,
|
mqtt_port: 1886,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_stocks".into(),
|
database_url: "postgres://postgres@localhost/myco_stocks".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -495,7 +495,7 @@ impl Default for OrderConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1887,
|
mqtt_port: 1887,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_orders".into(),
|
database_url: "postgres://postgres@localhost/myco_orders".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -641,7 +641,7 @@ impl Default for TokensConfig {
|
|||||||
rpc_bind: "0.0.0.0".into(),
|
rpc_bind: "0.0.0.0".into(),
|
||||||
mqtt_port: 1889,
|
mqtt_port: 1889,
|
||||||
mqtt_bind: "0.0.0.0".into(),
|
mqtt_bind: "0.0.0.0".into(),
|
||||||
database_url: "postgres://postgres@localhost/bazzar_tokens".into(),
|
database_url: "postgres://postgres@localhost/myco_tokens".into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -802,7 +802,7 @@ impl Default for AppConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn default_load(opts: &impl UpdateConfig) -> SharedAppConfig {
|
pub fn default_load(opts: &impl UpdateConfig) -> SharedAppConfig {
|
||||||
load("./bazzar.toml", opts)
|
load("./myco.toml", opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load(config_path: &str, opts: &impl UpdateConfig) -> SharedAppConfig {
|
pub fn load(config_path: &str, opts: &impl UpdateConfig) -> SharedAppConfig {
|
||||||
@ -819,7 +819,7 @@ pub fn load(config_path: &str, opts: &impl UpdateConfig) -> SharedAppConfig {
|
|||||||
let config = AppConfig::example();
|
let config = AppConfig::example();
|
||||||
std::fs::write(config_path, toml::to_string_pretty(&config).unwrap()).unwrap();
|
std::fs::write(config_path, toml::to_string_pretty(&config).unwrap()).unwrap();
|
||||||
eprintln!("Config was automatically generated");
|
eprintln!("Config was automatically generated");
|
||||||
eprintln!("Please review ./bazzar.toml, fill all fields or provide all environment variables in .env");
|
eprintln!("Please review ./myco.toml, fill all fields or provide all environment variables in .env");
|
||||||
eprintln!("And restart service.");
|
eprintln!("And restart service.");
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
@ -841,8 +841,8 @@ WEB_HOST - your domain name, it's required for PayU notifications, service email
|
|||||||
PASS_SALT - password encryption secret string, you can generate it with this CLI
|
PASS_SALT - password encryption secret string, you can generate it with this CLI
|
||||||
SESSION_SECRET - 100 characters admin session encryption
|
SESSION_SECRET - 100 characters admin session encryption
|
||||||
JWT_SECRET - 100 characters user session encryption
|
JWT_SECRET - 100 characters user session encryption
|
||||||
BAZZAR_BIND - address to which server should be bind, typically 0.0.0.0
|
myco_BIND - address to which server should be bind, typically 0.0.0.0
|
||||||
BAZZAR_PORT - port which server should use, typically 80
|
myco_PORT - port which server should use, typically 80
|
||||||
SIGNATURE - Signature used in e-mails
|
SIGNATURE - Signature used in e-mails
|
||||||
SERVICE_NAME - Shop name
|
SERVICE_NAME - Shop name
|
||||||
|
|
||||||
@ -850,7 +850,7 @@ SENDGRID_SECRET - e-mail sending service secret
|
|||||||
SENDGRID_API_KEY - e-mail sending service api key
|
SENDGRID_API_KEY - e-mail sending service api key
|
||||||
SMTP_FROM - e-mail sending service authorized e-mail address used as sender e-mail address
|
SMTP_FROM - e-mail sending service authorized e-mail address used as sender e-mail address
|
||||||
|
|
||||||
DATABASE_URL - postgresql address (ex. postgres://postgres@localhost/bazzar)
|
DATABASE_URL - postgresql address (ex. postgres://postgres@localhost/myco)
|
||||||
|
|
||||||
SONIC_SEARCH_ADDR - search engine query address
|
SONIC_SEARCH_ADDR - search engine query address
|
||||||
SONIC_SEARCH_PASS - search engine query password
|
SONIC_SEARCH_PASS - search engine query password
|
||||||
|
@ -107,7 +107,7 @@ mod tests {
|
|||||||
|
|
||||||
#[actix::test]
|
#[actix::test]
|
||||||
async fn check_lookup() {
|
async fn check_lookup() {
|
||||||
let config = config::load("../../bazzar.toml", &Opts);
|
let config = config::load("../../myco.toml", &Opts);
|
||||||
let ctx = crate::Context::new(config.clone()).unwrap();
|
let ctx = crate::Context::new(config.clone()).unwrap();
|
||||||
|
|
||||||
create_index(
|
create_index(
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! db_t_ref {
|
macro_rules! db_t_ref {
|
||||||
($t: ident) => {
|
($t: ident) => {
|
||||||
let config = config::load("../../tests/bazzar.toml", &mut NoOpts);
|
let config = config::load("../../tests/myco.toml", &mut NoOpts);
|
||||||
config
|
config
|
||||||
.lock()
|
.lock()
|
||||||
.database_mut()
|
.database_mut()
|
||||||
.set_url("postgres://postgres@localhost/bazzar_test");
|
.set_url("postgres://postgres@localhost/myco_test");
|
||||||
|
|
||||||
let db = Database::build(config).await;
|
let db = Database::build(config).await;
|
||||||
let pool = db.pool();
|
let pool = db.pool();
|
||||||
@ -16,11 +16,11 @@ macro_rules! db_t_ref {
|
|||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! db {
|
macro_rules! db {
|
||||||
($config: ident, $db: ident) => {
|
($config: ident, $db: ident) => {
|
||||||
let $config = config::load("../../tests/bazzar.toml", &mut NoOpts);
|
let $config = config::load("../../tests/myco.toml", &mut NoOpts);
|
||||||
$config
|
$config
|
||||||
.lock()
|
.lock()
|
||||||
.database_mut()
|
.database_mut()
|
||||||
.set_url("postgres://postgres@localhost/bazzar_test");
|
.set_url("postgres://postgres@localhost/myco_test");
|
||||||
|
|
||||||
let $db = Database::build($config.clone()).await;
|
let $db = Database::build($config.clone()).await;
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@ CREATE TABLE tokens
|
|||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
customer_id uuid NOT NULL,
|
customer_id uuid NOT NULL,
|
||||||
role "Role" NOT NULL,
|
role "Role" NOT NULL,
|
||||||
issuer character varying DEFAULT 'bazzar'::character varying NOT NULL,
|
issuer character varying DEFAULT 'myco'::character varying NOT NULL,
|
||||||
subject integer NOT NULL,
|
subject integer NOT NULL,
|
||||||
audience "Audience" DEFAULT 'web'::"Audience" NOT NULL,
|
audience "Audience" DEFAULT 'web'::"Audience" NOT NULL,
|
||||||
expiration_time timestamp without time zone DEFAULT (now() + '14 days'::interval) NOT NULL,
|
expiration_time timestamp without time zone DEFAULT (now() + '14 days'::interval) NOT NULL,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link id="logo" data-trunk rel="icon" href="assets/logo.png" >
|
<link id="logo" data-trunk rel="icon" href="assets/logo.png" >
|
||||||
<title>Bazzar</title>
|
<title>Myco</title>
|
||||||
<link data-trunk rel="css" href="tmp/tailwind.css"/>
|
<link data-trunk rel="css" href="tmp/tailwind.css"/>
|
||||||
<link rel="copy-file" href="assets/logo.png">
|
<link rel="copy-file" href="assets/logo.png">
|
||||||
<link rel="copy-file" href="tmp/tailwind.css">
|
<link rel="copy-file" href="tmp/tailwind.css">
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
'https://plantuml.com/deployment-diagram
|
'https://plantuml.com/deployment-diagram
|
||||||
|
|
||||||
rectangle "Dependencies" {
|
rectangle "Dependencies" {
|
||||||
database bazzar_accounts2 [
|
database myco_accounts2 [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_accounts
|
myco_accounts
|
||||||
]
|
]
|
||||||
database bazzar_carts2 [
|
database myco_carts2 [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_carts
|
myco_carts
|
||||||
]
|
]
|
||||||
database "sonic "
|
database "sonic "
|
||||||
database bazzar_stocks2 [
|
database myco_stocks2 [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_stocks
|
myco_stocks
|
||||||
]
|
]
|
||||||
cloud "sendgrid "
|
cloud "sendgrid "
|
||||||
queue "rumqttd "
|
queue "rumqttd "
|
||||||
|
@ -6,18 +6,18 @@ scale 1000
|
|||||||
rectangle "API" {
|
rectangle "API" {
|
||||||
' left to right direction
|
' left to right direction
|
||||||
|
|
||||||
node "bazzar"
|
node "myco"
|
||||||
queue rumqttd
|
queue rumqttd
|
||||||
|
|
||||||
component "Accounts" {
|
component "Accounts" {
|
||||||
node "account-manager"
|
node "account-manager"
|
||||||
database bazzar_accounts [
|
database myco_accounts [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_accounts
|
myco_accounts
|
||||||
]
|
]
|
||||||
|
|
||||||
"account-manager" <-up-> bazzar_accounts
|
"account-manager" <-up-> myco_accounts
|
||||||
"account-manager" --> rumqttd : emit event
|
"account-manager" --> rumqttd : emit event
|
||||||
|
|
||||||
usecase create_account [
|
usecase create_account [
|
||||||
@ -50,13 +50,13 @@ rectangle "API" {
|
|||||||
|
|
||||||
component "Carts" {
|
component "Carts" {
|
||||||
node "cart-manager"
|
node "cart-manager"
|
||||||
database bazzar_carts [
|
database myco_carts [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_carts
|
myco_carts
|
||||||
]
|
]
|
||||||
|
|
||||||
"cart-manager" <-up-> bazzar_carts
|
"cart-manager" <-up-> myco_carts
|
||||||
|
|
||||||
usecase modify_item [
|
usecase modify_item [
|
||||||
Modify
|
Modify
|
||||||
@ -115,13 +115,13 @@ rectangle "API" {
|
|||||||
|
|
||||||
component "Stocks" {
|
component "Stocks" {
|
||||||
node "stock-manager"
|
node "stock-manager"
|
||||||
database bazzar_stocks [
|
database myco_stocks [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_stocks
|
myco_stocks
|
||||||
]
|
]
|
||||||
|
|
||||||
"stock-manager" <-up-> bazzar_stocks
|
"stock-manager" <-up-> myco_stocks
|
||||||
"stock-manager" --> rumqttd : emit event
|
"stock-manager" --> rumqttd : emit event
|
||||||
|
|
||||||
circle product [
|
circle product [
|
||||||
@ -249,14 +249,14 @@ rectangle "API" {
|
|||||||
cloud
|
cloud
|
||||||
service
|
service
|
||||||
]
|
]
|
||||||
database bazzar_payments [
|
database myco_payments [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_payments
|
myco_payments
|
||||||
]
|
]
|
||||||
|
|
||||||
"payment-manager" <-up(0)-> payment_service : http
|
"payment-manager" <-up(0)-> payment_service : http
|
||||||
"payment-manager" <-up-> bazzar_payments
|
"payment-manager" <-up-> myco_payments
|
||||||
"payment-manager" --> rumqttd : emit event
|
"payment-manager" --> rumqttd : emit event
|
||||||
|
|
||||||
usecase request [
|
usecase request [
|
||||||
@ -275,13 +275,13 @@ rectangle "API" {
|
|||||||
|
|
||||||
component "Orders" {
|
component "Orders" {
|
||||||
node "order-manager"
|
node "order-manager"
|
||||||
database bazzar_orders [
|
database myco_orders [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_orders
|
myco_orders
|
||||||
]
|
]
|
||||||
|
|
||||||
"order-manager" <-up-> bazzar_orders
|
"order-manager" <-up-> myco_orders
|
||||||
"order-manager" --> rumqttd : emit event
|
"order-manager" --> rumqttd : emit event
|
||||||
|
|
||||||
usecase create_order [
|
usecase create_order [
|
||||||
@ -308,13 +308,13 @@ rectangle "API" {
|
|||||||
|
|
||||||
component "Tokens" {
|
component "Tokens" {
|
||||||
node "token-manager"
|
node "token-manager"
|
||||||
database bazzar_tokens [
|
database myco_tokens [
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
---
|
---
|
||||||
bazzar_tokens
|
myco_tokens
|
||||||
]
|
]
|
||||||
|
|
||||||
"token-manager" <-up-> bazzar_tokens
|
"token-manager" <-up-> myco_tokens
|
||||||
"token-manager" --> rumqttd : emit event
|
"token-manager" --> rumqttd : emit event
|
||||||
|
|
||||||
usecase create_jwt [
|
usecase create_jwt [
|
||||||
@ -338,14 +338,14 @@ rectangle "API" {
|
|||||||
rectangle {
|
rectangle {
|
||||||
actor " rumqttd"
|
actor " rumqttd"
|
||||||
|
|
||||||
"bazzar" -- "Accounts" : rpc
|
"myco" -- "Accounts" : rpc
|
||||||
"bazzar" -- "Carts" : rpc
|
"myco" -- "Carts" : rpc
|
||||||
"bazzar" -- "Stocks" : rpc
|
"myco" -- "Stocks" : rpc
|
||||||
"bazzar" -- "Search" : rpc
|
"myco" -- "Search" : rpc
|
||||||
"bazzar" -- "E-Mail" : rpc
|
"myco" -- "E-Mail" : rpc
|
||||||
"bazzar" -- "Tokens" : rpc
|
"myco" -- "Tokens" : rpc
|
||||||
"bazzar" -- "Payments" : rpc
|
"myco" -- "Payments" : rpc
|
||||||
"bazzar" --> " rumqttd" : emit event
|
"myco" --> " rumqttd" : emit event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ impl Migration {
|
|||||||
Stores,
|
Stores,
|
||||||
&mut [
|
&mut [
|
||||||
Id.col().uuid().not_null().primary_key().default_gen_uuid(),
|
Id.col().uuid().not_null().primary_key().default_gen_uuid(),
|
||||||
Name.col().string().default("Bazzar".to_string()).not_null(),
|
Name.col().string().default("myco".to_string()).not_null(),
|
||||||
DefaultCurrencyCode.col().string().default("pln").not_null(),
|
DefaultCurrencyCode.col().string().default("pln").not_null(),
|
||||||
SwapLinkTemplate.col().string(),
|
SwapLinkTemplate.col().string(),
|
||||||
CreatedAt.col().timestamp().not_null().default_now(),
|
CreatedAt.col().timestamp().not_null().default_now(),
|
||||||
|
@ -7,7 +7,7 @@ fi
|
|||||||
|
|
||||||
./scripts/migrate.sh purge
|
./scripts/migrate.sh purge
|
||||||
|
|
||||||
rm ./crates/**/bazzar.toml
|
rm ./crates/**/myco.toml
|
||||||
|
|
||||||
cargo nextest run --workspace --exclude database_manager
|
cargo nextest run --workspace --exclude database_manager
|
||||||
|
|
||||||
@ -19,4 +19,4 @@ cargo nextest run --workspace --exclude database_manager
|
|||||||
#cargo test --bin search-manager
|
#cargo test --bin search-manager
|
||||||
#cargo test --bin stock-manager
|
#cargo test --bin stock-manager
|
||||||
##cargo test --bin token_manager
|
##cargo test --bin token_manager
|
||||||
#cargo test --bin bazzar
|
#cargo test --bin myco
|
||||||
|
@ -6,13 +6,13 @@ optional_payment = true
|
|||||||
|
|
||||||
[web]
|
[web]
|
||||||
host = 'https://your.comain.com'
|
host = 'https://your.comain.com'
|
||||||
pass_salt = 'Generate it with bazzar generate-hash'
|
pass_salt = 'Generate it with myco generate-hash'
|
||||||
session_secret = '100 characters long random string'
|
session_secret = '100 characters long random string'
|
||||||
jwt_secret = '100 characters long random string'
|
jwt_secret = '100 characters long random string'
|
||||||
bind = '0.0.0.0'
|
bind = '0.0.0.0'
|
||||||
port = 8080
|
port = 8080
|
||||||
signature = 'John Doe'
|
signature = 'John Doe'
|
||||||
service_name = 'bazzar'
|
service_name = 'myco'
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
sendgrid_secret = 'Create sendgrid account and copy credentials here'
|
sendgrid_secret = 'Create sendgrid account and copy credentials here'
|
||||||
@ -20,7 +20,7 @@ sendgrid_api_key = 'Create sendgrid account and copy credentials here'
|
|||||||
smtp_from = 'Valid sendgrid authorized email address. Example: contact@example.com'
|
smtp_from = 'Valid sendgrid authorized email address. Example: contact@example.com'
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
url = 'postgres://postgres@localhost/bazzar'
|
url = 'postgres://postgres@localhost/myco'
|
||||||
|
|
||||||
[search]
|
[search]
|
||||||
sonic_search_addr = '[::1]:1491'
|
sonic_search_addr = '[::1]:1491'
|
||||||
@ -33,32 +33,32 @@ search_active = true
|
|||||||
|
|
||||||
[files]
|
[files]
|
||||||
public_path = '/uploads'
|
public_path = '/uploads'
|
||||||
local_path = '/var/local/bazzar'
|
local_path = '/var/local/myco'
|
||||||
|
|
||||||
[account_manager]
|
[account_manager]
|
||||||
rpc_port = 19329
|
rpc_port = 19329
|
||||||
rpc_bind = '0.0.0.0'
|
rpc_bind = '0.0.0.0'
|
||||||
mqtt_port = 1883
|
mqtt_port = 1883
|
||||||
mqtt_bind = '0.0.0.0'
|
mqtt_bind = '0.0.0.0'
|
||||||
database_url = 'postgres://postgres@localhost/bazzar_accounts'
|
database_url = 'postgres://postgres@localhost/myco_accounts'
|
||||||
|
|
||||||
[cart_manager]
|
[cart_manager]
|
||||||
rpc_port = 19330
|
rpc_port = 19330
|
||||||
rpc_bind = '0.0.0.0'
|
rpc_bind = '0.0.0.0'
|
||||||
mqtt_port = 1884
|
mqtt_port = 1884
|
||||||
mqtt_bind = '0.0.0.0'
|
mqtt_bind = '0.0.0.0'
|
||||||
database_url = 'postgres://postgres@localhost/bazzar_carts'
|
database_url = 'postgres://postgres@localhost/myco_carts'
|
||||||
|
|
||||||
[email_sender]
|
[email_sender]
|
||||||
rpc_port = 19331
|
rpc_port = 19331
|
||||||
rpc_bind = '0.0.0.0'
|
rpc_bind = '0.0.0.0'
|
||||||
mqtt_port = 1885
|
mqtt_port = 1885
|
||||||
mqtt_bind = '0.0.0.0'
|
mqtt_bind = '0.0.0.0'
|
||||||
database_url = 'postgres://postgres@localhost/bazzar_emails'
|
database_url = 'postgres://postgres@localhost/myco_emails'
|
||||||
|
|
||||||
[stocks]
|
[stocks]
|
||||||
rpc_port = 19333
|
rpc_port = 19333
|
||||||
rpc_bind = '0.0.0.0'
|
rpc_bind = '0.0.0.0'
|
||||||
mqtt_port = 1886
|
mqtt_port = 1886
|
||||||
mqtt_bind = '0.0.0.0'
|
mqtt_bind = '0.0.0.0'
|
||||||
database_url = 'postgres://postgres@localhost/bazzar_stocks'
|
database_url = 'postgres://postgres@localhost/myco_stocks'
|
||||||
|
Loading…
Reference in New Issue
Block a user