Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit bea59ca

Browse files
committed
refactor(rename): mastani -> groupher
1 parent c8ef04f commit bea59ca

File tree

557 files changed

+1179
-1179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

557 files changed

+1179
-1179
lines changed

.dialyzer_ignore.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# {short_description}
55
{":0:unknown_type Unknown type: Result.Object.t/0."},
66
# {file, warning_type}
7-
{"lib/mastani_server/cms/utils/loader.ex", :no_return},
7+
{"lib/groupher_server/cms/utils/loader.ex", :no_return},
88
# {file, warning_type}
9-
{"lib/mastani_server_web/schema.ex", :no_return},
9+
{"lib/groupher_server_web/schema.ex", :no_return},
1010
# {file, warning_type}
11-
{"lib/mastani_server_web/schema.ex", :no_return}
11+
{"lib/groupher_server_web/schema.ex", :no_return}
1212
]

Makefile.include.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ REPO = "coderplanets_server"
88
DASHBOARD_APOLLO_LINK = "https://engine.apollographql.com/account/gh.mydearxym/services"
99
DASHBOARD_PM2_LINK = "https://app.pm2.io"
1010
DASHBOARD_ALIYUN_LINK = "https://home.console.aliyun.com/new"
11-
DASHBOARD_SENTRY_LINK = "https://sentry.io/mastani-stack/cps_server_prod"
11+
DASHBOARD_SENTRY_LINK = "https://sentry.io/groupher-stack/cps_server_prod"
1212

1313
CI_BUILD_LINK = "https://travis-ci.org/$(BELONG)/$(REPO)"
1414
CI_COVERAGE_LINK = "https://coveralls.io/github/$(BELONG)/$(REPO)"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
![CPS Brand](https://github.com/mydearxym/mastani_server/blob/dev/docs/snapshots/cps_logo_md.png?raw=true)
2+
![CPS Brand](https://github.com/mydearxym/groupher_server/blob/dev/docs/snapshots/cps_logo_md.png?raw=true)
33
=========
44
[![Build Status](https://travis-ci.org/coderplanets/coderplanets_server.svg?branch=dev)](https://travis-ci.org/coderplanets/coderplanets_server)
55
[![codecov](https://codecov.io/gh/coderplanets/coderplanets_server/branch/dev/graph/badge.svg)](https://codecov.io/gh/coderplanets/coderplanets_server)
66
[![Inline docs](http://inch-ci.org/github/coderplanets/coderplanets_server.svg)](http://inch-ci.org/github/coderplanets/coderplanets_server)
77
[![Dev updates](https://badgen.net/badge/Dependabot/enabled/cyan)](https://dependabot.com/elixir.html)
88
[![codebeat badge](https://codebeat.co/badges/865d4bcd-7e9e-4678-8770-b763de155235)](https://codebeat.co/projects/github-com-coderplanets-coderplanets_server-dev)
99
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://conventionalcommits.org/)
10-
[![Powerd by](https://badgen.now.sh/badge/mastani/powered/a871c1)](https://github.com/mastani-stack)
10+
[![Powerd by](https://badgen.now.sh/badge/groupher/powered/a871c1)](https://github.com/groupher-stack)
1111
[![cps badge](https://badgen.net/badge/join%20community/on%20coderplanets/9cb77b)](https://github.com/coderplanets/coderplanets_server)
1212

1313
## As advertising: the author is looking for a job :)

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
![CPS Brand](https://github.com/mydearxym/mastani_server/blob/dev/docs/snapshots/cps_logo_md.png)
2+
![CPS Brand](https://github.com/mydearxym/groupher_server/blob/dev/docs/snapshots/cps_logo_md.png)
33
=========
44
[![Build Status](https://travis-ci.org/coderplanets/coderplanets_server.svg?branch=dev)](https://travis-ci.org/coderplanets/coderplanets_server)
55
[![codecov](https://codecov.io/gh/coderplanets/coderplanets_server/branch/dev/graph/badge.svg)](https://codecov.io/gh/coderplanets/coderplanets_server)
66
[![Inline docs](http://inch-ci.org/github/coderplanets/coderplanets_server.svg)](http://inch-ci.org/github/coderplanets/coderplanets_server)
77
[![Dev updates](https://badgen.net/badge/Dependabot/enabled/cyan)](https://dependabot.com/elixir.html)
88
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://conventionalcommits.org/)
9-
[![Powerd by](https://badgen.now.sh/badge/mastani/powered/a871c1)](https://github.com/mastani-stack)
9+
[![Powerd by](https://badgen.now.sh/badge/groupher/powered/a871c1)](https://github.com/groupher-stack)
1010
[![cps badge](https://badgen.net/badge/join%20community/on%20coderplanets/9cb77b)](https://github.com/coderplanets/coderplanets_server)
1111

1212
#### 插播广告: 项目作者正在找工作,如果您有合适的工作机会,欢迎与我联系 :)

config/ci.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use Mix.Config
22

3-
config :mastani_server, MastaniServerWeb.Endpoint,
3+
config :groupher_server, GroupherServerWeb.Endpoint,
44
http: [port: 4001],
55
debug_errors: true,
66
code_reloader: true,
@@ -12,14 +12,14 @@ config :logger, :console, format: "[$level] $message\n"
1212
config :phoenix, :stacktrace_depth, 20
1313

1414
# Configure your database
15-
config :mastani_server, MastaniServer.Repo,
15+
config :groupher_server, GroupherServer.Repo,
1616
adapter: Ecto.Adapters.Postgres,
1717
username: "postgres",
1818
password: "postgres",
19-
database: "mastani_server_ci",
19+
database: "groupher_server_ci",
2020
hostname: "localhost",
2121
pool_size: 10
2222

23-
config :mastani_server, :github_oauth,
23+
config :groupher_server, :github_oauth,
2424
client_id: "3b4281c5e54ffd801f85",
2525
client_secret: "68462fdbab195251bb71662eb2bc9dd2cb083305"

config/config.exs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
use Mix.Config
77

88
# General application configuration
9-
config :mastani_server, ecto_repos: [MastaniServer.Repo]
9+
config :groupher_server, ecto_repos: [GroupherServer.Repo]
1010

1111
# Configures the endpoint
12-
config :mastani_server, MastaniServerWeb.Endpoint,
12+
config :groupher_server, GroupherServerWeb.Endpoint,
1313
url: [host: "localhost"],
1414
secret_key_base: "Ru3N3sehqeuFjBV2Z6k7FuyA59fH8bWm8D4aZWu2RifP3xKMBYo3YRILrnXAGezM",
15-
render_errors: [view: MastaniServerWeb.ErrorView, accepts: ~w(json)],
16-
pubsub: [name: MastaniServer.PubSub, adapter: Phoenix.PubSub.PG2]
15+
render_errors: [view: GroupherServerWeb.ErrorView, accepts: ~w(json)],
16+
pubsub: [name: GroupherServer.PubSub, adapter: Phoenix.PubSub.PG2]
1717

1818
# Configures Elixir's Logger
1919
config :logger, :console,
@@ -23,18 +23,18 @@ config :logger, :console,
2323
config :phoenix, :json_library, Jason
2424

2525
# TODO move this config to secret later
26-
config :mastani_server, Helper.Guardian,
27-
issuer: "mastani_server",
26+
config :groupher_server, Helper.Guardian,
27+
issuer: "groupher_server",
2828
secret_key: "kSTPDbCUSRhiEmv86eYMUplL7xI5fDa/+6MWKzK2VYGxjwL0XGHHVJiSPNPe9hJe"
2929

30-
config :mastani_server, :mix_test_watch, exclude: [~r/docs\/.*/, ~r/deps\/.*/, ~r/mix.exs/]
30+
config :groupher_server, :mix_test_watch, exclude: [~r/docs\/.*/, ~r/deps\/.*/, ~r/mix.exs/]
3131
# secret_key: {:system, "GUARDIAN_DEMO_SECRET_KEY"}
3232

3333
config :pre_commit, commands: ["format"], verbose: false
3434
# Import environment specific config. This must remain at the bottom
3535
# of this file so it overrides the configuration defined above.
3636

37-
config :mastani_server, :general,
37+
config :groupher_server, :general,
3838
page_size: 30,
3939
inner_page_size: 5,
4040
# today is not include
@@ -52,7 +52,7 @@ config :mastani_server, :general,
5252
user_achieve_favorite_weight: 2,
5353
user_achieve_follow_weight: 3
5454

55-
config :mastani_server, :customization,
55+
config :groupher_server, :customization,
5656
theme: "cyan",
5757
community_chart: false,
5858
brainwash_free: false,
@@ -64,7 +64,7 @@ config :mastani_server, :customization,
6464
display_density: "20",
6565
sidebar_communities_index: %{}
6666

67-
config :mastani_server, MastaniServerWeb.Gettext, default_locale: "zh_CN", locales: ~w(en zh_CN)
67+
config :groupher_server, GroupherServerWeb.Gettext, default_locale: "zh_CN", locales: ~w(en zh_CN)
6868

6969
import_config "#{Mix.env()}.exs"
7070

config/dev.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Mix.Config
66
# The watchers configuration can be used to run external
77
# watchers to your application. For example, we use it
88
# with brunch.io to recompile .js and .css sources.
9-
config :mastani_server, MastaniServerWeb.Endpoint,
9+
config :groupher_server, GroupherServerWeb.Endpoint,
1010
http: [port: String.to_integer(System.get_env("SERVE_PORT") || "7001")],
1111
debug_errors: true,
1212
code_reloader: true,
@@ -38,11 +38,11 @@ config :phoenix, :stacktrace_depth, 20
3838

3939
# You can generate a new secret by running:
4040
# mix phx.gen.secret
41-
config :mastani_server, MastaniServerWeb.Endpoint,
41+
config :groupher_server, GroupherServerWeb.Endpoint,
4242
secret_key_base: System.get_env("SECRET_KEY_BASE")
4343

4444
# should use RDS 内网地址
45-
config :mastani_server, MastaniServer.Repo,
45+
config :groupher_server, GroupherServer.Repo,
4646
adapter: Ecto.Adapters.Postgres,
4747
username: System.get_env("DB_USERNAME"),
4848
password: System.get_env("DB_PASSWORD"),
@@ -51,6 +51,6 @@ config :mastani_server, MastaniServer.Repo,
5151
port: String.to_integer(System.get_env("DB_PORT") || "3433"),
5252
pool_size: String.to_integer(System.get_env("DB_POOL_SIZE") || "20")
5353

54-
config :mastani_server, :github_oauth,
54+
config :groupher_server, :github_oauth,
5555
client_id: System.get_env("OAUTH_GITHUB_CLIENT_ID"),
5656
client_secret: System.get_env("OAUTH_GITHUB_CLIENT_SECRET")

config/mock.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use Mix.Config
22

3-
config :mastani_server, MastaniServerWeb.Endpoint,
3+
config :groupher_server, GroupherServerWeb.Endpoint,
44
http: [port: 4001],
55
debug_errors: true,
66
code_reloader: true,
@@ -12,10 +12,10 @@ config :logger, :console, format: "[$level] $message\n"
1212
config :phoenix, :stacktrace_depth, 20
1313

1414
# Configure your database
15-
config :mastani_server, MastaniServer.Repo,
15+
config :groupher_server, GroupherServer.Repo,
1616
adapter: Ecto.Adapters.Postgres,
1717
username: "postgres",
1818
password: "postgres",
19-
database: "mastani_server_mock",
19+
database: "groupher_server_mock",
2020
hostname: "localhost",
2121
pool_size: 10

config/prod.exs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use Mix.Config
33
# For production, we often load configuration from external
44
# sources, such as your system environment. For this reason,
55
# you won't find the :http configuration below, but set inside
6-
# MastaniServerWeb.Endpoint.init/2 when load_from_system_env is
6+
# GroupherServerWeb.Endpoint.init/2 when load_from_system_env is
77
# true. Any dynamic configuration should be done there.
88
#
99
# Don't forget to configure the url host to something meaningful,
@@ -13,7 +13,7 @@ use Mix.Config
1313
# containing the digested version of static files. This
1414
# manifest is generated by the mix phx.digest task
1515
# which you typically run after static files are built.
16-
config :mastani_server, MastaniServerWeb.Endpoint,
16+
config :groupher_server, GroupherServerWeb.Endpoint,
1717
load_from_system_env: true,
1818
url: [host: "coderplanets.com", port: 80]
1919

@@ -28,7 +28,7 @@ config :logger, :console, format: "[$level] $message\n"
2828
# To get SSL working, you will need to add the `https` key
2929
# to the previous section and set your `:url` port to 443:
3030
#
31-
# config :mastani_server, MastaniServerWeb.Endpoint,
31+
# config :groupher_server, GroupherServerWeb.Endpoint,
3232
# ...
3333
# url: [host: "example.com", port: 443],
3434
# https: [:inet6,
@@ -43,7 +43,7 @@ config :logger, :console, format: "[$level] $message\n"
4343
# We also recommend setting `force_ssl`, ensuring no data is
4444
# ever sent via http, always redirecting to https:
4545
#
46-
# config :mastani_server, MastaniServerWeb.Endpoint,
46+
# config :groupher_server, GroupherServerWeb.Endpoint,
4747
# force_ssl: [hsts: true]
4848
#
4949
# Check `Plug.SSL` for all available options in `force_ssl`.
@@ -58,20 +58,20 @@ config :logger, :console, format: "[$level] $message\n"
5858
# Alternatively, you can configure exactly which server to
5959
# start per endpoint:
6060
#
61-
# config :mastani_server, MastaniServerWeb.Endpoint, server: true
61+
# config :groupher_server, GroupherServerWeb.Endpoint, server: true
6262
#
6363

6464
# Finally import the config/prod.secret.exs
6565
# which should be versioned separately.
6666
# import_config "prod.secret.exs"
6767

68-
config :mastani_server, MastaniServerWeb.Endpoint,
68+
config :groupher_server, GroupherServerWeb.Endpoint,
6969
secret_key_base: System.get_env("SECRET_KEY_BASE")
7070

7171
# You can generate a new secret by running:
7272
# mix phx.gen.secret
7373
# should use RDS 内网地址
74-
config :mastani_server, MastaniServer.Repo,
74+
config :groupher_server, GroupherServer.Repo,
7575
adapter: Ecto.Adapters.Postgres,
7676
username: System.get_env("DB_USERNAME"),
7777
password: System.get_env("DB_PASSWORD"),
@@ -80,11 +80,11 @@ config :mastani_server, MastaniServer.Repo,
8080
port: String.to_integer(System.get_env("DB_PORT") || "3433"),
8181
pool_size: String.to_integer(System.get_env("DB_POOL_SIZE") || "20")
8282

83-
config :mastani_server, :github_oauth,
83+
config :groupher_server, :github_oauth,
8484
client_id: System.get_env("OAUTH_GITHUB_CLIENT_ID"),
8585
client_secret: System.get_env("OAUTH_GITHUB_CLIENT_SECRET")
8686

87-
config :mastani_server, :radar_search, ip_service: System.get_env("IP_LOCATE_KEY")
87+
config :groupher_server, :radar_search, ip_service: System.get_env("IP_LOCATE_KEY")
8888

8989
config :sentry,
9090
dsn: System.get_env("SENTRY_DSN"),

config/test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ use Mix.Config
22

33
# We don't run a server during test. If one is required,
44
# you can enable the server option below.
5-
config :mastani_server, MastaniServerWeb.Endpoint,
5+
config :groupher_server, GroupherServerWeb.Endpoint,
66
http: [port: 4001],
77
server: false
88

99
# Print only warnings and errors during test
1010
config :logger, level: :warn
1111

12-
config :mastani_server, :test,
12+
config :groupher_server, :test,
1313
# 成都电信 ip, for test use
1414
remote_ip: "171.223.96.88"
1515

1616
# Configure your database
17-
config :mastani_server, MastaniServer.Repo,
17+
config :groupher_server, GroupherServer.Repo,
1818
adapter: Ecto.Adapters.Postgres,
1919
username: "postgres",
2020
password: "postgres",
21-
database: "mastani_server_test",
21+
database: "groupher_server_test",
2222
hostname: "localhost",
2323
pool: Ecto.Adapters.SQL.Sandbox
2424

25-
config :mastani_server, :github_oauth,
25+
config :groupher_server, :github_oauth,
2626
client_id: "3b4281c5e54ffd801f85",
2727
client_secret: "51f04dd8239b27f00a39a647ef3704de4c5ddc26"

cover/excoveralls.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

deploy/dev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From bitwalker/alpine-elixir-phoenix:1.6.6
22

33
RUN mkdir /root/api_server
4-
# RUN mkdir /root/mastani_api_monitor
4+
# RUN mkdir /root/groupher_api_monitor
55

66
# change timezone to +8
77

deploy/dev/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fake mastani site
1+
fake groupher site

docs/analysis/apollo-engine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ package` section
1414

1515
## snapshot
1616

17-
![apollo-explorer](https://github.com/mydearxym/mastani_server/blob/dev/docs/snapshots/apollo-explorer.png)
18-
![apollo-metrics](https://github.com/mydearxym/mastani_server/blob/dev/docs/snapshots/apollo-metrics.png)
17+
![apollo-explorer](https://github.com/mydearxym/groupher_server/blob/dev/docs/snapshots/apollo-explorer.png)
18+
![apollo-metrics](https://github.com/mydearxym/groupher_server/blob/dev/docs/snapshots/apollo-metrics.png)
1919

2020

2121

docs/architecture/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
this document is intended to give you a taste of how `coderplanets_server` works, It still assumes basic knowledge of Elixir/Phoenix and GraphQL. **If you're completely new to Elixir/GraphQL, please refer to https://elixir-lang.org/getting-started/introduction or https://www.howtographql.com/ first!**
33

4-
> NOTE: since coderplanets_server is build on top of [mastani-stack](https://github.com/mastani-stack), the whole project is under namespace of `Mastani`
4+
> NOTE: since coderplanets_server is build on top of [groupher-stack](https://github.com/groupher-stack), the whole project is under namespace of `Groupher`
55
66
## Tech Stack
77

@@ -42,15 +42,15 @@ In any case, here's the TL;DR:
4242

4343
### `lib/`
4444

45-
- `mastani_server/` we split our logic code into contexts. a context will group
45+
- `groupher_server/` we split our logic code into contexts. a context will group
4646
related functionality which located in context's `delegates` dir, By using contexts, we decouple and isolate our systems into *5* manageable, independent parts:
4747
- `accounts/` handle account-related logic like: register, profile, mailbox, achievement, billing, customization ...
4848
- `cms/` handle content-releated logic like: community curd/operation/reactions, contents(posts, jobs, videos, ..) CURD/operation/reactions ...
4949
- `delivery/` handle msg-related logic like: user mentions, system notifications ...
5050
- `log/` record important actions
5151
- `statistics/` handle statistics like: user contributes, community contributes ...
5252

53-
- `mastani_server_web/` handle "web-interface" only logic
53+
- `groupher_server_web/` handle "web-interface" only logic
5454
- `resolvers/` graphql resolvers based on Context
5555
- `schema/` graphql schema based on Context, include queries & mutations
5656
- `middleware/` common logic like authorize, passport, pagesize_check ...

docs/architecture/intro.zh-CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
基础知识, 如果你对它们还不太了解,请参考
44
*https://elixir-lang.org/getting-started/introduction**https://www.howtographql.com/*
55

6-
> NOTE: since coderplanets_server is build on top of [mastani-stack](https://github.com/mastani-stack), the whole project is under namespace of `Mastani`
6+
> NOTE: since coderplanets_server is build on top of [groupher-stack](https://github.com/groupher-stack), the whole project is under namespace of `Groupher`
77
88
## Tech Stack
99

@@ -44,15 +44,15 @@ In any case, here's the TL;DR:
4444

4545
### `lib/`
4646

47-
- `mastani_server/` we split our logic code into contexts. a context will group
47+
- `groupher_server/` we split our logic code into contexts. a context will group
4848
related functionality which located in context's `delegates` dir, By using contexts, we decouple and isolate our systems into *5* manageable, independent parts:
4949
- `accounts/` handle account-related logic like: register, profile, mailbox, achievement, billing, customization ...
5050
- `cms/` handle content-releated logic like: community curd/operation/reactions, contents(posts, jobs, videos, ..) CURD/operation/reactions ...
5151
- `delivery/` handle msg-related logic like: user mentions, system notifications ...
5252
- `log/` record important actions
5353
- `statistics/` handle statistics like: user contributes, community contributes ...
5454

55-
- `mastani_server_web/` handle "web-interface" only logic
55+
- `groupher_server_web/` handle "web-interface" only logic
5656
- `resolvers/` graphql resolvers based on Context
5757
- `schema/` graphql schema based on Context, include queries & mutations
5858
- `middleware/` common logic like authorize, passport, pagesize_check ...

docs/deployment/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
coderplanets deploys on aliyun, the basic deploy architechture as follows:
55

6-
![deploy structure](https://github.com/mydearxym/mastani_server/blob/dev/docs/snapshots/deployment.png)
6+
![deploy structure](https://github.com/mydearxym/groupher_server/blob/dev/docs/snapshots/deployment.png)
77

docs/development/generator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
```sh
77
env MIX_ENV=mock iex -S mix
88

9-
mix test.watch test/mastani_server/cms/cms_passport_test.exs --only wip
9+
mix test.watch test/groupher_server/cms/cms_passport_test.exs --only wip
1010

1111
mix ecto.gen.migration add_xxx
1212

@@ -30,7 +30,7 @@
3030
env MIX_ENV=test mix ecto.setup
3131
```
3232

33-
this cmd only preform on `mastani_server_test` databse
33+
this cmd only preform on `groupher_server_test` databse
3434

3535

3636
## prod

0 commit comments

Comments
 (0)