Skip to content

Commit

Permalink
Merge pull request #188 from ani-team/dev
Browse files Browse the repository at this point in the history
v.0.2.X

RELEASE THE KRAKEN!!
  • Loading branch information
azinit authored Dec 4, 2020
2 parents 8d0b291 + e9ee811 commit 036dae5
Show file tree
Hide file tree
Showing 109 changed files with 1,939 additions and 639 deletions.
12 changes: 9 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
SKIP_PREFLIGHT_CHECK=true
API_GENCOMMENT=/** @generated THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */

REACT_APP_API_URL=https://api.github.com/graphql
# Используется для кодогенерации, Apollo Client плагина
REACT_APP_ACCESS_TOKEN=9221b1b5ba4b0de72eed80b09602ed7b4c73c222

# Firebase section
REACT_APP_FIREBASE_apiKey=AIzaSyABlBQc-tjCRKWwBj8jTTrMiT2M2UKiJpk
Expand All @@ -15,3 +12,12 @@ REACT_APP_FIREBASE_messagingSenderId=14406286286
REACT_APP_FIREBASE_appId=1:14406286286:web:58c7c11c2762d36a55c99f

REACT_APP_DEV_STORAGE_URL=https://dev.github-client.gq/dev/temp-stands.html

# Github links
REACT_APP_API_URL=https://api.github.com/graphql
REACT_APP_GITHUB_DOMAIN=https://github.com/
REACT_APP_GITHUB_MAIN=https://github.com/ani-team/github-client
REACT_APP_GITHUB_FEEDBACK=https://github.com/ani-team/github-client/issues/new

# Используется для кодогенерации, Apollo Client плагина
REACT_APP_ACCESS_TOKEN=8709f2ca2f263a81f1de65511485c97c70f653f0
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist/**
build/**
*.gen.ts
.github
public/
.workflows
74 changes: 60 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/** Разрешенные импорты (с публичными API) */
const ALLOWED_PATH_GROUPS = ["shared", "shared/**", "pages", "features", "models"].map(
(pattern) => ({
pattern,
group: "internal",
position: "after",
}),
);
/** Для запрета приватных путей */
const DENIED_PATH_GROUPS = [
// Private imports are prohibited, use public imports instead
"app/**",
"pages/**",
"features/**",
"shared/*/**",
"models.gen",
// Prefer absolute imports instead of relatives (for root modules)
"../**/app",
"../**/pages",
"../**/features",
"../**/shared",
"../**/models",
];

module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -12,7 +36,7 @@ module.exports = {
browser: true,
es6: true,
},
plugins: ["react", "@typescript-eslint", "@graphql-eslint"],
plugins: ["react", "@typescript-eslint", "@graphql-eslint", "unicorn"],
extends: [
"react-app",
"eslint:recommended",
Expand All @@ -25,29 +49,50 @@ module.exports = {
"prettier/react",
],
rules: {
// imports
"import/first": 2,
"import/no-unresolved": 0,
"import/order": [
2,
{
pathGroups: [
"shared",
"shared/**",
"pages",
"pages/**",
"features",
"features/**",
"models",
].map((pattern) => ({
pattern,
group: "internal",
position: "after",
})),
pathGroups: ALLOWED_PATH_GROUPS,
// TODO: Добавить сортировку `import "./index.scss";` (располагать внизу)
// TODO: Добавить сортировку `import *** from "react"` (располагать вверху)
pathGroupsExcludedImportTypes: ["builtin"],
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
},
],
// TODO: specify message: ("Please use allowed public API (not private imports!)")
"no-restricted-imports": [2, { patterns: DENIED_PATH_GROUPS }],
// variables
"prefer-const": 2,
"no-var": 2,
// base
"camelcase": [1, { ignoreDestructuring: true, ignoreImports: true, properties: "never" }],
"no-else-return": 2,
"max-len": [1, { code: 120 }],
"dot-notation": 2,
"eol-last": 2,
// alert, console
"no-alert": 2,
"no-console": 0,
// equals
"eqeqeq": 1,
"no-eq-null": 2,
// function
"max-params": [1, 2],
"max-lines-per-function": [1, 48],
"arrow-parens": [2, "always"],
// plugin:unicorn
"unicorn/no-for-loop": 2,
"unicorn/no-abusive-eslint-disable": 2,
"unicorn/no-array-instanceof": 2,
"unicorn/no-zero-fractions": 2,
"unicorn/prefer-includes": 2,
"unicorn/prefer-text-content": 2,
"unicorn/import-index": 2,
"unicorn/throw-new-error": 2,
// plugin:graphql
"@graphql-eslint/no-anonymous-operations": 2,
},
overrides: [
Expand All @@ -57,6 +102,7 @@ module.exports = {
plugins: ["@graphql-eslint"],
rules: {
"prettier/prettier": 0,
"max-len": 0,
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Production CI/CD
name: CI

on:
push:
Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# github-client

![Version](https://img.shields.io/github/package-json/v/ani-team/github-client)
![CI](https://github.com/niyazm524/github-client/workflows/CI/badge.svg?branch=master)
![Website](https://img.shields.io/website?down_message=offline&up_message=online&url=https%3A%2F%2Fgithub-client.gq)
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fani-team%2Fgithub-client&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
![GitHub top language](https://img.shields.io/github/languages/top/niyazm524/github-client)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/ani-team/github-client)

<img alt="favicon" src="https://avatars2.githubusercontent.com/oa/1406180?s=140&u=b44629cbec5079f99a61e6f1b6297bc4797f796b&v=4" height=120 align="right" />

> Powered by [Feature Driven Development](https://www.notion.so/Feature-Driven-Development-dfe306d664ae4780bcf999ccdd15e532 "Entire app was designed and builded with FDD core conceptions")
GitHub client within the *React Akvelon 2020* course.

[wiki]: https://github.com/martis-git/github-client/wiki
Expand All @@ -22,37 +31,39 @@ GitHub client within the *React Akvelon 2020* course.
<!-- Указаны ссылки на "prod"-стенд как на основной и более стабильный -->

- See repo/collabs list and details of [any user](https://github-client.gq/gaearon)
- See base info of [any public repository](https://github-client.gq/facebook/react) with [branches base manipulating](https://github-client.gq/facebook/react/tree/17.0.0-dev)
- See base info and stats of [any public repository](https://github-client.gq/facebook/react) with [branches base manipulating](https://github-client.gq/facebook/react/tree/17.0.0-dev)
- Use search by [repositories](https://github-client.gq/search?o=desc&q=react&s=stars)/[users](https://github-client.gq/search?o=desc&q=google&s=repositories&type=users) with sorting
- View corresponding page on github <b title="Our routing is identical with github">through origin button!</b>
- Try our <b title="Our routing is identical with github">end-to-end routing with Github</b> with origin button, and specific adaptations on every page!
- Connect with your account safely - [by Github OAuth](https://github-client.gq/auth)
- [Get feedback](https://github-client.gq/some-unexisting-route-but-we-have-error-parking-page) if some errors occurred
- Try our base interactivity on [UserPage](https://github-client.gq/gaearon) - following, starring
- Get the best UX with our **loading && placeholder view logic**
- Try [**github-client right now**](https://github-client.gq) or [last dev version (but unstable)](https://dev.github-client.gq) =}

> If you found issues or have ideas for service - please, [share with us](https://github.com/ani-team/github-client/issues/new) 🔥
<img alt="screen" src="docs/search.png" />
![screen](docs/search.png)

## Technology stack
- **UI**: `react`, `antd`, `classnames`, `tailwindcss`
- **Lang**: `typescript (3.7+)`
- **Fetching**: `graphql`, `apollo-client (3+)`
- **API Codegen**: `graphql-codegen`
- **Routing**: `react-router`
- <b title="Super linting from @martis-git">Tests</b>: `eslint`, `prettier`, `graphql-eslint`, `stylelint`
- **Tests**: `eslint`, `prettier`, `graphql-eslint`, `stylelint`
- **Auth**: `GitHub OAuth`, `firebase`
- <b title="Super CI/CD from @niyazm524">CI/CD</b>: `github-actions`, `firebase`
- **CI/CD**: `github-actions`, `firebase`

<div align="center">
<img title="react" alt="react" height=48 src="https://cdn.auth0.com/blog/react-js/react.png"/>
<img title="typescript" alt="typescript" height=48 src="https://raw.githubusercontent.com/remojansen/logo.ts/master/ts.png"/>
<img title="antdesign" alt="antdesign" height=48 src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"/>
<img title="graphql" alt="graphql" height=48 src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/GraphQL_Logo.svg/1200px-GraphQL_Logo.svg.png"/>
<img title="apollo" alt="apollo" height=48 src="https://miro.medium.com/max/300/0*xdVGlEH7f9cRVaR-"/>
<img title="eslint" alt="eslint" height=48 src="https://d33wubrfki0l68.cloudfront.net/204482ca413433c80cd14fe369e2181dd97a2a40/092e2/assets/img/logo.svg"/>
<img title="eslint (Super linting from @martis-git)" alt="eslint" height=48 src="https://d33wubrfki0l68.cloudfront.net/204482ca413433c80cd14fe369e2181dd97a2a40/092e2/assets/img/logo.svg"/>
<img title="prettier" alt="prettier" height=48 src="https://prettier.io/icon.png"/>
<img title="stylelint" alt="stylelint" height=48 src="https://camo.githubusercontent.com/aa04feafbd080140cd834905cf171ccf7b06fc5f1f1ae07ce9879218165312d1/68747470733a2f2f63646e2e776f726c64766563746f726c6f676f2e636f6d2f6c6f676f732f7374796c656c696e742e737667"/>
<img title="github" alt="github" height=48 src="https://image.flaticon.com/icons/png/512/25/25231.png" />
<img title="github-actions" alt="github-actions" height=48 src="https://avatars0.githubusercontent.com/u/44036562?s=200&v=4" />
<img title="github-actions (Super CI/CD from @niyazm524)" alt="github-actions" height=48 src="https://avatars0.githubusercontent.com/u/44036562?s=200&v=4" />
<img title="firebase" alt="firebase" height=48 src="https://www.gstatic.com/devrel-devsite/prod/v73fbca10ce7899da426d451b3f74ee09bc6846fcf427552c7e8e85261505ef2c/firebase/images/touchicon-180.png" />
</div>
Binary file modified docs/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 036dae5

Please sign in to comment.