├── .npmrc ├── .gitignore ├── .prettierrc ├── screenshots └── homepage.png ├── nest-cli.json ├── src ├── client │ └── public │ │ ├── assets │ │ └── favicons │ │ │ ├── favicon.ico │ │ │ ├── favicon-192.png │ │ │ ├── favicon-32.png │ │ │ ├── favicon-36.png │ │ │ ├── favicon-48.png │ │ │ ├── favicon-57.png │ │ │ ├── favicon-60.png │ │ │ ├── favicon-72.png │ │ │ ├── favicon-76.png │ │ │ ├── favicon-96.png │ │ │ ├── favicon-114-precomposed.png │ │ │ ├── favicon-120-precomposed.png │ │ │ ├── favicon-144-precomposed.png │ │ │ ├── favicon-152-precomposed.png │ │ │ ├── favicon-180-precomposed.png │ │ │ ├── favicon-72-precomposed.png │ │ │ ├── manifest.json │ │ │ └── index.html │ │ ├── scripts │ │ └── swagger.js │ │ └── styles │ │ └── swagger.css └── server │ ├── app.service.ts │ ├── services │ ├── kibibit-logger.service.ts │ └── kibibit-logger.service.spec.ts │ ├── app.module.ts │ ├── main.hmr.ts │ ├── app.controller.ts │ ├── app.controller.spec.ts │ └── main.ts ├── tsconfig.spec.json ├── nodemon.json ├── nodemon-debug.json ├── test ├── jest-e2e.json └── app.e2e-spec.ts ├── .travis.yml ├── PULL_REQUEST_TEMPLATE.md ├── .github ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md ├── ISSUE_TEMPLATE │ ├── development-bug-report.md │ ├── feature_request.md │ └── bug_report.md └── config.yml ├── commitlint.config.js ├── webpack.config.js ├── tsconfig.json ├── tslint.json ├── package.json └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | package-lock.json 3 | test-results/ 4 | .DS_Store -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /screenshots/homepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/screenshots/homepage.png -------------------------------------------------------------------------------- /nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "ts", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src/server" 5 | } 6 | -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon.ico -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-192.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-32.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-36.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-48.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-57.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-60.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-72.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-76.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-96.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-114-precomposed.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-120-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-120-precomposed.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-144-precomposed.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-152-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-152-precomposed.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-180-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-180-precomposed.png -------------------------------------------------------------------------------- /src/client/public/assets/favicons/favicon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/achievibit-new/master/src/client/public/assets/favicons/favicon-72-precomposed.png -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["jest", "node"] 5 | }, 6 | "include": ["**/*.spec.ts", "**/*.d.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["src/server"], 3 | "ext": "ts", 4 | "ignore": ["src/server/**/*.spec.ts"], 5 | "exec": "ts-node -r tsconfig-paths/register src/server/main.ts" 6 | } 7 | -------------------------------------------------------------------------------- /nodemon-debug.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["src/server"], 3 | "ext": "ts", 4 | "ignore": ["src/server/**/*.spec.ts"], 5 | "exec": "node --inspect-brk -r ts-node/register src/server/main.ts" 6 | } -------------------------------------------------------------------------------- /src/server/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | root(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/server/services/kibibit-logger.service.ts: -------------------------------------------------------------------------------- 1 | import * as colors from 'colors'; 2 | import { Logger } from '@nestjs/common'; 3 | 4 | export class KibibitLoggerService extends Logger { 5 | info(message: string) { 6 | super.log(`${ colors.bgBlue.black(' [INFO] ') } ${ colors.blue(message) }`); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - ~/.npm 5 | notifications: 6 | email: false 7 | node_js: 8 | - '10' 9 | after_success: 10 | - npm run travis-deploy-once "npm run semantic-release" 11 | - npm run coveralls 12 | branches: 13 | except: 14 | - /^v\d+\.\d+\.\d+$/ 15 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Change Summary 2 | 3 | - change short synopsis I [resolves #00] 4 | > additional info about this mission 5 | 6 | - change short synopsis II (mission without additional info) 7 | - change short synopsis III 8 | 9 | ## More info 10 | 11 | (Free text here with additional photos, wikis, and additional needed information) 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Change Summary 2 | 3 | - change short synopsis I [resolves #00] 4 | > additional info about this mission 5 | 6 | - change short synopsis II (mission without additional info) 7 | - change short synopsis III 8 | 9 | ## More info 10 | 11 | (Free text here with additional photos, wikis, and additional needed information) 12 | -------------------------------------------------------------------------------- /src/server/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | import { KibibitLoggerService } from './services/kibibit-logger.service'; 5 | 6 | @Module({ 7 | imports: [], 8 | controllers: [AppController], 9 | providers: [AppService, KibibitLoggerService] 10 | }) 11 | export class AppModule {} 12 | -------------------------------------------------------------------------------- /src/server/main.hmr.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | declare const module: any; 5 | 6 | async function bootstrap() { 7 | const app = await NestFactory.create(AppModule); 8 | await app.listen(3000); 9 | 10 | if (module.hot) { 11 | module.hot.accept(); 12 | module.hot.dispose(() => app.close()); 13 | } 14 | } 15 | bootstrap(); 16 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-angular'], 3 | rules: { 4 | 'type-enum': [ 5 | 2, 6 | 'always', [ 7 | 'build', 8 | 'chore', 9 | 'ci', 10 | 'docs', 11 | 'feat', 12 | 'fix', 13 | 'perf', 14 | 'refactor', 15 | 'revert', 16 | 'style', 17 | 'test' 18 | ] 19 | ] 20 | } 21 | }; -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/development-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Development Bug report 3 | about: Describe something that went wrong while writing features to achievibit 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | **To Reproduce** 10 | **Expected behavior** 11 | A clear and concise description of what you expected to happen. 12 | **Additional context** 13 | Add any other context about the problem here. 14 | -------------------------------------------------------------------------------- /src/server/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Get, Controller } from '@nestjs/common'; 2 | import { ApiOperation } from '@nestjs/swagger'; 3 | import { AppService } from './app.service'; 4 | 5 | @Controller() 6 | export class AppController { 7 | constructor(private readonly appService: AppService) {} 8 | 9 | @ApiOperation({ 10 | title: `Endpoint example title`, 11 | description: 'Mostly here as an example on how to document api endpoints' 12 | }) 13 | @Get() 14 | root(): string { 15 | return this.appService.root(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/client/public/scripts/swagger.js: -------------------------------------------------------------------------------- 1 | function addCss(fileName) { 2 | 3 | var head = document.head; 4 | var link = document.createElement("link"); 5 | 6 | link.type = "text/css"; 7 | link.rel = "stylesheet"; 8 | link.href = fileName; 9 | 10 | head.appendChild(link); 11 | } 12 | 13 | function addMetaTag() { 14 | var meta = document.createElement('meta'); 15 | meta.name = 'viewport'; 16 | meta.content = 'width=device-width, initial-scale=1'; 17 | document.getElementsByTagName('head')[0].appendChild(meta); 18 | } 19 | 20 | // inject fonts used in theme 21 | addCss('https://fonts.googleapis.com/css?family=Comfortaa|Righteous'); 22 | addMetaTag(); -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /test/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { INestApplication } from '@nestjs/common'; 2 | import { Test } from '@nestjs/testing'; 3 | import * as request from 'supertest'; 4 | import { AppModule } from './../src/server/app.module'; 5 | 6 | describe('AppController (e2e)', () => { 7 | let app: INestApplication; 8 | 9 | beforeAll(async () => { 10 | const moduleFixture = await Test.createTestingModule({ 11 | imports: [AppModule] 12 | }).compile(); 13 | 14 | app = moduleFixture.createNestApplication(); 15 | await app.init(); 16 | }); 17 | 18 | it('/ (GET)', () => { 19 | return request(app.getHttpServer()) 20 | .get('/') 21 | .expect(200) 22 | .expect('Hello World!'); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /src/server/app.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { INestApplication } from '@nestjs/common'; 3 | import { AppController } from './app.controller'; 4 | import { AppService } from './app.service'; 5 | 6 | // example 7 | 8 | describe('AppController', () => { 9 | let app: TestingModule; 10 | 11 | beforeAll(async () => { 12 | app = await Test.createTestingModule({ 13 | controllers: [AppController], 14 | providers: [AppService] 15 | }).compile(); 16 | }); 17 | 18 | describe('root', () => { 19 | it('should return "Hello World!"', () => { 20 | const appController = app.get(AppController); 21 | expect(appController.root()).toBe('Hello World!'); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const path = require('path'); 3 | const nodeExternals = require('webpack-node-externals'); 4 | 5 | module.exports = { 6 | entry: ['webpack/hot/poll?1000', './src/server/main.hmr.ts'], 7 | watch: true, 8 | target: 'node', 9 | externals: [ 10 | nodeExternals({ 11 | whitelist: ['webpack/hot/poll?1000'], 12 | }), 13 | ], 14 | module: { 15 | rules: [ 16 | { 17 | test: /\.tsx?$/, 18 | use: 'ts-loader', 19 | exclude: /node_modules/, 20 | }, 21 | ], 22 | }, 23 | mode: "development", 24 | resolve: { 25 | extensions: ['.tsx', '.ts', '.js'], 26 | }, 27 | plugins: [ 28 | new webpack.HotModuleReplacementPlugin(), 29 | ], 30 | output: { 31 | path: path.join(__dirname, 'dist'), 32 | filename: 'server.js', 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /src/client/public/assets/favicons/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pollo", 3 | "icons": [ 4 | { 5 | "src": "\/favicon-36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": 0.75 9 | }, 10 | { 11 | "src": "\/favicon-48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": 1 15 | }, 16 | { 17 | "src": "\/favicon-72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": 1.5 21 | }, 22 | { 23 | "src": "\/favicon-96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": 2 27 | }, 28 | { 29 | "src": "\/favicon-144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": 3 33 | }, 34 | { 35 | "src": "\/favicon-192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": 4 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "allowSyntheticDefaultImports": true, 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es6", 12 | "sourceMap": true, 13 | "outDir": "./dist", 14 | "baseUrl": "./src/server", 15 | "paths": { 16 | "@achievibit.modules": ["modules/database"], 17 | "@achievibit.database": ["modules/database"], 18 | "@achievibit.config": ["modules/config"], 19 | "@achievibit.events": ["modules/events"], 20 | "@shared/*": ["../shared/*"], 21 | "@achievibit/*": ["*/"] 22 | } 23 | }, 24 | "include": [ 25 | "src/server/**/*" 26 | ], 27 | "exclude": [ 28 | "node_modules", 29 | "**/*.spec.ts" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /src/server/services/kibibit-logger.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { KibibitLoggerService } from './kibibit-logger.service'; 3 | 4 | describe('LoggerService', () => { 5 | let service: KibibitLoggerService; 6 | beforeAll(async () => { 7 | const module: TestingModule = await Test.createTestingModule({ 8 | providers: [KibibitLoggerService] 9 | }).compile(); 10 | 11 | service = module.get(KibibitLoggerService); 12 | }); 13 | 14 | it('should be defined', () => { 15 | expect(service).toBeDefined(); 16 | }); 17 | 18 | it('should have an info module', () => { 19 | expect(service.info).toBeDefined(); 20 | }); 21 | 22 | it('should call the super log function on call to info', () => { 23 | // mock log to check if it ran 24 | Object.getPrototypeOf(KibibitLoggerService.prototype).log = jest.fn(); 25 | const logFn = Object.getPrototypeOf(KibibitLoggerService.prototype).log; 26 | const testLogger = new KibibitLoggerService(null, true); 27 | 28 | testLogger.info('hello!'); 29 | 30 | expect(logFn).toHaveBeenCalledTimes(1); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 2 | 3 | # Comment to be posted to on first time issues 4 | newIssueWelcomeComment: > 5 | Thanks for opening your first issue here! Be sure to follow the issue template! 6 | 7 | ![welcome](https://cdn.dribbble.com/users/27231/screenshots/2432051/welcome.gif) 8 | 9 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 10 | 11 | # Comment to be posted to on PRs from first time contributors in your repository 12 | newPRWelcomeComment: > 13 | Thanks for opening this pull request! Please check out our contributing guidelines. 14 | 15 | ![welcome](https://cdn.dribbble.com/users/27231/screenshots/2432051/welcome.gif) 16 | 17 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 18 | 19 | # Comment to be posted to on pull requests merged by a first time user 20 | firstPRMergeComment: > 21 | Congrats on merging your first pull request! We are so proud of you! 22 | 23 | ![congratz](https://media.giphy.com/media/l2Sqir5ZxfoS27EvS/giphy.gif) 24 | 25 | Hope you got a few achievements 👏 👏 👏 26 | 27 | Come again! 28 | 29 | # It is recommend to include as many gifs and emojis as possible -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "jsRules": { 7 | "no-unused-expression": true 8 | }, 9 | "rules": { 10 | "eofline": false, 11 | "quotemark": [ 12 | true, 13 | "single" 14 | ], 15 | "indent": false, 16 | "member-access": [ 17 | false 18 | ], 19 | "ordered-imports": [ 20 | false 21 | ], 22 | "max-line-length": [ 23 | true, 24 | 150 25 | ], 26 | "member-ordering": [ 27 | false 28 | ], 29 | "trailing-comma": [true, {"multiline": "never", "singleline": "never"}], 30 | "curly": false, 31 | "interface-name": [ 32 | false 33 | ], 34 | "array-type": [ 35 | false 36 | ], 37 | "no-empty-interface": false, 38 | "no-empty": false, 39 | "arrow-parens": false, 40 | "object-literal-sort-keys": false, 41 | "no-unused-expression": false, 42 | "max-classes-per-file": false, 43 | "variable-name": [ 44 | false 45 | ], 46 | "one-line": [ 47 | false 48 | ], 49 | "one-variable-per-declaration": [ 50 | false 51 | ] 52 | }, 53 | "rulesDirectory": [] 54 | } 55 | -------------------------------------------------------------------------------- /src/server/main.ts: -------------------------------------------------------------------------------- 1 | import * as pkginfo from 'pkginfo'; 2 | import { NestFactory } from '@nestjs/core'; 3 | import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; 4 | import { KibibitLoggerService } from './services/kibibit-logger.service'; 5 | import { AppModule } from './app.module'; 6 | import { readFileSync } from 'fs'; 7 | import { join } from 'path'; 8 | 9 | async function bootstrap() { 10 | const app = await NestFactory.create(AppModule); 11 | 12 | app.useLogger(app.get(KibibitLoggerService)); 13 | 14 | app.useStaticAssets(join(__dirname, './frontend/public')); 15 | // app.setBaseViewsDir(join(__dirname, './frontend/views')); 16 | 17 | const options = new DocumentBuilder() 18 | .setTitle(module.exports.name) 19 | .setDescription('achievibit API endpoints') 20 | .setVersion(module.exports.version) 21 | .setContactEmail(module.exports.author) 22 | // .setHost('https://achievibit.kibibit.io') 23 | .setLicense(module.exports.license, '') 24 | .build(); 25 | const document = SwaggerModule.createDocument(app, options); 26 | 27 | SwaggerModule.setup('api', app, document, { 28 | customSiteTitle: `kibibit - achievibit API documentation`, 29 | customCss: readFileSync(join(__dirname, '../client/public/styles/swagger.css'), 'utf8'), 30 | customJs: '../scripts/swagger.js', 31 | customfavIcon: '../assets/favicons/favicon-32.png' 32 | }); 33 | 34 | await app.listen(3000); 35 | } 36 | 37 | bootstrap(); 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kibibit/achievibit", 3 | "version": "0.0.0-development", 4 | "description": "Github Gamification - Achievements system as a GitHub WebHook", 5 | "author": "neilkalman@gmail.com", 6 | "license": "MIT", 7 | "scripts": { 8 | "format": "prettier --write \"src/server/**/*.ts\"", 9 | "start": "ts-node -r tsconfig-paths/register src/server/main.ts", 10 | "start:dev": "nodemon", 11 | "start:debug": "nodemon --config nodemon-debug.json", 12 | "prestart:prod": "rimraf dist && tsc", 13 | "start:prod": "node dist/main.js", 14 | "start:hmr": "node dist/server", 15 | "lint": "tslint -p tsconfig.json -c tslint.json", 16 | "test": "jest", 17 | "test:watch": "jest --watch", 18 | "test:cov": "jest --coverage", 19 | "test:e2e": "jest --config ./test/jest-e2e.json", 20 | "webpack": "webpack --config webpack.config.js", 21 | "commit": "git-cz", 22 | "travis-deploy-once": "travis-deploy-once", 23 | "semantic-release": "semantic-release", 24 | "coveralls": "npm run test:cov && cat ./test-results/lcov.info | coveralls" 25 | }, 26 | "dependencies": { 27 | "@nestjs/common": "^5.1.0", 28 | "@nestjs/core": "^5.1.0", 29 | "@nestjs/swagger": "^2.5.1", 30 | "pkginfo": "^0.4.1", 31 | "reflect-metadata": "^0.1.12", 32 | "rxjs": "^6.2.2", 33 | "typescript": "^3.0.1" 34 | }, 35 | "devDependencies": { 36 | "@commitlint/cli": "^7.2.1", 37 | "@commitlint/config-angular": "^7.1.2", 38 | "@nestjs/testing": "^5.1.0", 39 | "@semantic-release/commit-analyzer": "^6.1.0", 40 | "@semantic-release/git": "^7.0.5", 41 | "@semantic-release/github": "^5.2.1", 42 | "@semantic-release/npm": "^5.1.1", 43 | "@semantic-release/release-notes-generator": "^7.1.4", 44 | "@types/express": "^4.16.0", 45 | "@types/jest": "^23.3.1", 46 | "@types/node": "^10.7.1", 47 | "@types/supertest": "^2.0.5", 48 | "commitizen": "^3.0.4", 49 | "coveralls": "^3.0.2", 50 | "cz-conventional-changelog": "^2.1.0", 51 | "husky": "^1.1.3", 52 | "jest": "^23.5.0", 53 | "jest-html-reporter": "^2.4.2", 54 | "nodemon": "^1.18.3", 55 | "prettier": "^1.14.2", 56 | "rimraf": "^2.6.2", 57 | "semantic-release": "^15.10.8", 58 | "supertest": "^3.1.0", 59 | "travis-deploy-once": "^5.0.9", 60 | "ts-jest": "^23.1.3", 61 | "ts-loader": "^4.4.2", 62 | "ts-node": "^7.0.1", 63 | "tsconfig-paths": "^3.5.0", 64 | "tslint": "5.11.0", 65 | "webpack": "^4.16.5", 66 | "webpack-cli": "^3.1.0", 67 | "webpack-node-externals": "^1.7.2" 68 | }, 69 | "release": { 70 | "plugins": [ 71 | "@semantic-release/commit-analyzer", 72 | "@semantic-release/release-notes-generator", 73 | [ 74 | "@semantic-release/git", 75 | { 76 | "assets": false, 77 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 78 | } 79 | ], 80 | "@semantic-release/github", 81 | "@semantic-release/npm" 82 | ] 83 | }, 84 | "husky": { 85 | "hooks": { 86 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" 87 | } 88 | }, 89 | "jest": { 90 | "coverageReporters": [ 91 | "json", 92 | "lcov", 93 | "text", 94 | "clover", 95 | "html" 96 | ], 97 | "coverageDirectory": "../../test-results", 98 | "reporters": [ 99 | "default", 100 | [ 101 | "jest-html-reporter", 102 | { 103 | "pageTitle": "achievibit's Test Report", 104 | "outputPath": "./test-results/test-report.html" 105 | } 106 | ] 107 | ], 108 | "moduleFileExtensions": [ 109 | "js", 110 | "json", 111 | "ts" 112 | ], 113 | "rootDir": "src/server", 114 | "testRegex": ".spec.ts$", 115 | "transform": { 116 | "^.+\\.(t|j)s$": "ts-jest" 117 | }, 118 | "testEnvironment": "node" 119 | }, 120 | "config": { 121 | "commitizen": { 122 | "path": "./node_modules/cz-conventional-changelog" 123 | } 124 | }, 125 | "repository": { 126 | "type": "git", 127 | "url": "https://github.com/Kibibit/achievibit-new.git" 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | WIP 2 | 3 |

4 | achievibit Logo 5 | 6 |

7 | 8 | [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) 9 | [![Build Status](https://travis-ci.org/Kibibit/achievibit-new.svg?branch=master)](https://travis-ci.org/Kibibit/achievibit-new) 10 | [![Coverage Status](https://coveralls.io/repos/github/Kibibit/achievibit-new/badge.svg)](https://coveralls.io/github/Kibibit/achievibit-new) 11 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6ede30ddc2d84311b420dd661aca5f4b)](https://www.codacy.com/app/neilkalman/achievibit-new?utm_source=github.com&utm_medium=referral&utm_content=Kibibit/achievibit-new&utm_campaign=Badge_Grade) 12 | 13 | ## Description 14 | 15 | - Get achievements on different characteristics of your pull requests 16 | - Use the [achievibit chrome extension](https://chrome.google.com/webstore/detail/achievibit/iddkmddomdohnihbehiamfnmpomlhpee?utm_source=achievibitreadme) to see `achievibit` inside `GitHub` 17 | 18 | ## how to use 19 | 20 | **we're working on implementing GitHub oAuth to support some extra features.** 21 | 22 | ***stay tuned*** 23 | 24 | `achievibit` needs to be integrated into each enabled repository via a **webhook**. 25 | 26 | 1. Go to your main repository page 27 | 2. click on ***Settings*** 28 | 3. on the sidebar, click on ***Webhooks*** 29 | 4. click on ***add webhook*** 30 | 5. paste achievibit's url (`https://achievibit.kibibit.io`) into the ***payload url*** 31 | 6. change ***Content type*** to `application/json` 32 | 7. on ***Which events would you like to trigger this webhook?***, select `Let me select individual events.` and check `Pull request` and `Pull request reviews` 33 | 34 | **Maybe sometime later we'll also support repo achievements. open an issue if you're interested :-)** 35 | 36 | ## Chrome extension [![Chrome Store Version](https://img.shields.io/chrome-web-store/v/iddkmddomdohnihbehiamfnmpomlhpee.svg)](https://chrome.google.com/webstore/detail/achievibit/iddkmddomdohnihbehiamfnmpomlhpee) [![Chrome Store Downloads](https://img.shields.io/chrome-web-store/d/iddkmddomdohnihbehiamfnmpomlhpee.svg)](https://chrome.google.com/webstore/detail/achievibit/iddkmddomdohnihbehiamfnmpomlhpee) 37 | You can install our chrome extension to see achievements in github profiles, 38 | and see an animation everytime you get an achievement 39 | 40 | ## Add our shield to your project's README 41 | 42 | We've just started, and we want to spread the word. We would really appreciate if you'll add our shield if you think `achievibit` is worth talking about 43 | 44 | copy this snippet to any **markdown** file 45 | - shield: number of achievable achievements [![Supported achievements](http://achievibit.kibibit.io/achievementsShield)](https://achievibit.kibibit.io) 46 | 47 | ```markdown 48 | [![Supported achievements](http://achievibit.kibibit.io/achievementsShield)](https://achievibit.kibibit.io) 49 | ``` 50 | 51 | ## Development 52 | 53 | ### Installation 54 | 55 | ```bash 56 | $ npm install 57 | ``` 58 | 59 | ### Running the app 60 | 61 | ```bash 62 | # development 63 | $ npm run start 64 | 65 | # watch mode 66 | $ npm run start:dev 67 | 68 | # incremental rebuild (webpack) 69 | $ npm run webpack 70 | $ npm run start:hmr 71 | 72 | # production mode 73 | $ npm run start:prod 74 | ``` 75 | 76 | ### Test 77 | 78 | ```bash 79 | # unit tests 80 | $ npm run test 81 | 82 | # e2e tests 83 | $ npm run test:e2e 84 | 85 | # test coverage 86 | $ npm run test:cov 87 | ``` 88 | 89 | ## Stay in touch 90 | 91 | - Author - [Neil Kalman](https://github.com/thatkookooguy) 92 | - Website - [https://nestjs.com](https://nestjs.com/) 93 | - Twitter - [@nestframework](https://twitter.com/nestframework) 94 | 95 | ## Contributors 96 | 97 | Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing](CONTRIBUTING.MD). 98 | 99 | You can check out some easy to start with issues in the [Easy Pick](https://github.com/Kibibit/achievibit/labels/Easy%20Pick). 100 | 101 | ## Contributor Code of Conduct 102 | Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). 103 | 104 | By participating in this project you agree to abide by its terms. 105 | 106 | ## License 107 | 108 | [MIT License](LICENSE) 109 | 110 | Copyright (c) 2018 Neil Kalman <neilkalman@gmail.com> 111 | -------------------------------------------------------------------------------- /src/client/public/assets/favicons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Favicons 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 72 | 73 | 74 | 75 | 76 |
77 |

78 | To use the favicons insert into your head section some of these tags accordly to your needs. 79 |

80 |
81 |
 82 |             
 83 | <!-- For old IEs -->
 84 | <link rel="shortcut icon" href="favicon.ico" />
 85 | 
 86 | <!-- For new browsers - multisize ico  -->
 87 | <link rel="icon" type="image/x-icon" sizes="16x16 32x32" href="favicon.ico">
 88 | 
 89 | <!-- For iPad with high-resolution Retina display running iOS ≥ 7: -->
 90 | <link rel="apple-touch-icon" sizes="152x152" href="favicon-152-precomposed.png">
 91 | 
 92 | <!-- For iPad with high-resolution Retina display running iOS ≤ 6: -->
 93 | <link rel="apple-touch-icon" sizes="144x144" href="favicon-144-precomposed.png">
 94 | 
 95 | <!-- For iPhone with high-resolution Retina display running iOS ≥ 7: -->
 96 | <link rel="apple-touch-icon" sizes="120x120" href="favicon-120-precomposed.png">
 97 | 
 98 | <!-- For iPhone with high-resolution Retina display running iOS ≤ 6: -->
 99 | <link rel="apple-touch-icon" sizes="114x114" href="favicon-114-precomposed.png">
100 | 
101 | <!-- For iPhone 6+ -->
102 | <link rel="apple-touch-icon" sizes="180x180" href="favicon-180-precomposed.png">
103 | 
104 | <!-- For first- and second-generation iPad: -->
105 | <link rel="apple-touch-icon" sizes="72x72" href="favicon-72-precomposed.png">
106 | 
107 | <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
108 | <link rel="apple-touch-icon" href="favicon-57.png">
109 | 
110 | <!-- For Old Chrome -->
111 | <link rel="icon" href="favicon-32.png" sizes="32x32">
112 | 
113 | <!-- For IE10 Metro -->
114 | <meta name="msapplication-TileColor" content="#FFFFFF">
115 | <meta name="msapplication-TileImage" content="favicon-144.png">
116 | <meta name="theme-color" content="#ffffff">
117 | 
118 | <!-- Chrome for Android -->
119 | <link rel="manifest" href="manifest.json">
120 | <link rel="icon" sizes="192x192" href="favicon-192.png">
121 | 
122 |             
123 |             
124 | 125 |
126 | 127 |

128 | For more informations about favicons consult The Favicon Cheat Sheet by Audrey Roy. 129 |

130 | 131 |
132 | 133 | 134 | -------------------------------------------------------------------------------- /src/client/public/styles/swagger.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Comfortaa|Righteous'); 2 | 3 | body { 4 | background: rgba(55, 55, 55, 1); 5 | --get-color: #209cee; 6 | --post-color: hsl(141, 71%, 48%); 7 | --dark-post-color: hsl(141, 71%, 35%); 8 | --lighter-put-color: hsl(48, 100%, 67%); 9 | --put-color: hsl(34, 99%, 67%); 10 | --delete-color: hsl(348, 100%, 61%); 11 | --dark-delete-color: hsl(348, 63%, 48%); 12 | --section-color: var(--dark-post-color); 13 | --placeholder-color: rgba(255, 255, 255, 0.5); 14 | --main-text-color: whitesmoke; 15 | --second-text-color: #212121; 16 | --darker-shade: rgba(0, 0, 0, 0.2); 17 | } 18 | 19 | /* change swagger logo in topnav */ 20 | .swagger-ui .topbar .topbar-wrapper::before { 21 | content: url(../assets/icons/swagger-ui.svg); 22 | width: 2rem; 23 | height: 2rem; 24 | } 25 | 26 | .swagger-ui .topbar a > img { 27 | display: none; 28 | } 29 | /* END */ 30 | 31 | /* Allow topnav text to be bigger than default */ 32 | .swagger-ui .topbar a { 33 | max-width: none; 34 | } 35 | /* END */ 36 | 37 | .swagger-ui .topbar a span::before { 38 | content: 'kibibit\'s'; 39 | display: inline; 40 | padding: 0 10px 0 0; 41 | font-family: 'Righteous', cursive; 42 | letter-spacing: 0.05em; 43 | } 44 | 45 | .swagger-ui .topbar a span::after { 46 | content: 'API documentation'; 47 | display: inline; 48 | padding: 0 10px; 49 | font-family: 'Comfortaa', cursive; 50 | } 51 | 52 | .swagger-ui .topbar { 53 | /* ffdd57 */ 54 | background-color: var(--second-text-color); 55 | } 56 | 57 | .swagger-ui .info .title { 58 | font-family: 'Comfortaa', cursive; 59 | color: var(--main-text-color); 60 | } 61 | 62 | .swagger-ui, 63 | .swagger-ui .info .base-url, 64 | .swagger-ui .info a, 65 | .swagger-ui .opblock-tag { 66 | font-family: 'Comfortaa', cursive; 67 | color: var(--main-text-color); 68 | } 69 | 70 | .swagger-ui .opblock .opblock-summary-path { 71 | color: var(--put-color); 72 | font-family: 'Comfortaa', cursive; 73 | } 74 | 75 | .swagger-ui .opblock .opblock-summary-description, 76 | .swagger-ui .opblock-description-wrapper, 77 | .swagger-ui .response-col_status, 78 | .swagger-ui table thead tr td, 79 | .swagger-ui table thead tr th, 80 | .swagger-ui .opblock-description-wrapper p, 81 | .swagger-ui .opblock-external-docs-wrapper p, 82 | .swagger-ui .opblock-title_normal p { 83 | color: var(--main-text-color); 84 | font-family: 'Comfortaa', cursive; 85 | } 86 | 87 | .swagger-ui .btn.execute { 88 | background-color: var(--post-color); 89 | border-color: var(--post-color); 90 | border-radius: 0; 91 | } 92 | 93 | .swagger-ui .btn.execute:hover { 94 | background-color: var(--main-text-color); 95 | border-color: var(--main-text-color); 96 | border-radius: 0; 97 | color: var(--post-color); 98 | } 99 | 100 | .swagger-ui .opblock.opblock-post .btn.execute { 101 | background-color: var(--dark-post-color); 102 | border-color: var(--dark-post-color); 103 | color: var(--main-text-color); 104 | border-radius: 0; 105 | } 106 | 107 | .swagger-ui .opblock.opblock-post .btn.execute:hover { 108 | background-color: var(--main-text-color); 109 | border-color: var(--main-text-color); 110 | border-radius: 0; 111 | color: var(--dark-post-color); 112 | } 113 | 114 | .swagger-ui .info a { 115 | color: var(--get-color); 116 | } 117 | 118 | .swagger-ui .opblock .opblock-summary::after { 119 | width: 27px; 120 | height: 27px; 121 | transform: translate3d(-18px, 0, 0) rotate(-90deg); 122 | content: url(../assets/icons/original_caret.svg); 123 | } 124 | 125 | .swagger-ui .opblock.is-open .opblock-summary::after { 126 | transform: translate3d(-18px, 0, 0); 127 | content: url(../assets/icons/original_caret.svg); 128 | } 129 | 130 | .swagger-ui .opblock { 131 | border: none; 132 | } 133 | 134 | .swagger-ui .opblock .opblock-section-header { 135 | background: rgba(0, 0, 0, 0.4); 136 | color: var(--main-text-color); 137 | } 138 | 139 | .swagger-ui .opblock .opblock-section-header h4, 140 | .swagger-ui .opblock .opblock-section-header label { 141 | color: var(--main-text-color); 142 | font-family: 'Comfortaa', cursive; 143 | } 144 | 145 | .swagger-ui .opblock.opblock-get { 146 | background: var(--get-color); 147 | border-radius: 0; 148 | border-color: var(--get-color); 149 | } 150 | 151 | .swagger-ui .opblock.opblock-post { 152 | background: var(--post-color); 153 | border-radius: 0; 154 | border-color: var(--post-color); 155 | } 156 | 157 | .swagger-ui .opblock.opblock-put { 158 | background: var(--put-color); 159 | border-radius: 0; 160 | border-color: var(--put-color); 161 | } 162 | 163 | .swagger-ui .opblock.opblock-delete { 164 | background: var(--delete-color); 165 | border-radius: 0; 166 | border-color: var(--delete-color); 167 | } 168 | 169 | .swagger-ui .prop-type { 170 | font-family: 'Comfortaa', cursive; 171 | color: var(--section-color); 172 | } 173 | 174 | .swagger-ui section.models { 175 | background: var(--section-color); 176 | border-radius: 0; 177 | border-color: var(--section-color); 178 | } 179 | 180 | .swagger-ui section.models h4 { 181 | color: var(--main-text-color); 182 | font-family: 'Comfortaa', cursive; 183 | } 184 | 185 | .swagger-ui section.models h4 svg { 186 | transform: translateX(-6px); 187 | } 188 | 189 | .swagger-ui section.models .model-container { 190 | background: var(--main-text-color); 191 | } 192 | 193 | .swagger-ui section.models .model-container:hover { 194 | background: var(--main-text-color); 195 | } 196 | 197 | /* .swagger-ui section.models .model-container:hover { 198 | background: var(); 199 | } */ 200 | 201 | .swagger-ui .opblock.opblock-post .opblock-summary-path { 202 | color: var(--second-text-color); 203 | font-family: 'Comfortaa', cursive; 204 | } 205 | 206 | .swagger-ui .opblock.opblock-put .opblock-summary-path { 207 | color: var(--section-color); 208 | font-family: 'Comfortaa', cursive; 209 | } 210 | 211 | .swagger-ui .opblock .opblock-summary-method { 212 | background: var(--darker-shade) !important; 213 | border-radius: 0; 214 | } 215 | 216 | .swagger-ui .parameter__name { 217 | display: flex; 218 | align-items: center; 219 | font-family: 'Comfortaa', cursive; 220 | } 221 | 222 | .swagger-ui .parameter__name.required > span { 223 | display: none; 224 | } 225 | 226 | .swagger-ui .model-box .model td > span:not(.model) { 227 | color: transparent !important; 228 | } 229 | 230 | .swagger-ui .model-box .model td > span:not(.model)::after { 231 | content: 'required'; 232 | font-size: 0.9em; 233 | } 234 | 235 | .swagger-ui .parameter__name.required::after, 236 | .swagger-ui .model-box .model td > span:not(.model)::after { 237 | font-family: 'Comfortaa', cursive; 238 | align-items: center; 239 | background-color: var(--main-text-color); 240 | border-radius: 0.3em; 241 | color: var(--delete-color); 242 | display: inline-flex; 243 | height: 2em; 244 | justify-content: center; 245 | line-height: 1.5; 246 | padding-left: .75em; 247 | padding-right: .75em; 248 | white-space: nowrap; 249 | top: 0; 250 | margin: 0 0.6em; 251 | } 252 | 253 | 254 | .swagger-ui input[type=email], 255 | .swagger-ui input[type=password], 256 | .swagger-ui input[type=search], 257 | .swagger-ui input[type=text] { 258 | font-family: 'Comfortaa', cursive; 259 | background: transparent; 260 | border: none; 261 | border-bottom: 1px solid var(--placeholder-color); 262 | border-radius: 0; 263 | color: var(--placeholder-color); 264 | padding: 8px 0; 265 | } 266 | 267 | .swagger-ui input[type=email]:focus, 268 | .swagger-ui input[type=password]:focus, 269 | .swagger-ui input[type=search]:focus, 270 | .swagger-ui input[type=text]:focus { 271 | border-bottom: 2px solid var(--main-text-color); 272 | color: var(--main-text-color); 273 | } 274 | 275 | .swagger-ui input[type=email]::placeholder, 276 | .swagger-ui input[type=password]::placeholder, 277 | .swagger-ui input[type=search]::placeholder, 278 | .swagger-ui input[type=text]::placeholder { 279 | color: var(--placeholder-color); 280 | } 281 | 282 | .swagger-ui select { 283 | font-family: 'Comfortaa', cursive; 284 | padding: 5px 40px 5px 0; 285 | border-radius: 0; 286 | border: none; 287 | border-bottom: 2px solid var(--main-text-color); 288 | background-color: transparent; 289 | background-image: url(../assets/icons/original_caret_white.svg); 290 | background-size: 1em; 291 | box-shadow: none; 292 | color: var(--main-text-color); 293 | } 294 | 295 | .swagger-ui .btn { 296 | font-family: 'Comfortaa', cursive; 297 | border-color: var(--main-text-color); 298 | border-radius: 0; 299 | color: var(--main-text-color); 300 | transition: all 250ms; 301 | } 302 | 303 | .swagger-ui .btn.cancel { 304 | font-family: 'Comfortaa', cursive; 305 | border-color: var(--delete-color); 306 | color: var(--main-text-color); 307 | background-color: var(--delete-color); 308 | } 309 | 310 | .swagger-ui .btn.cancel:hover { 311 | color: var(--main-text-color); 312 | background-color: var(--dark-delete-color); 313 | border-color: var(--dark-delete-color); 314 | } 315 | 316 | .swagger-ui .btn:hover { 317 | background-color: var(--main-text-color); 318 | color: var(--second-text-color); 319 | } 320 | 321 | .swagger-ui .scheme-container { 322 | background: var(--section-color); 323 | } 324 | 325 | .swagger-ui .btn.authorize { 326 | /* background-color: var(--put-color); */ 327 | border-color: var(--put-color); 328 | color: var(--put-color); 329 | } 330 | 331 | .swagger-ui .btn.authorize svg { 332 | fill: var(--put-color); 333 | transition: all 250ms; 334 | } 335 | 336 | .swagger-ui .btn.authorize:hover { 337 | background-color: var(--put-color); 338 | border-color: var(--put-color); 339 | color: var(--main-text-color); 340 | } 341 | 342 | .swagger-ui .btn.authorize:hover svg { 343 | fill: var(--main-text-color); 344 | } 345 | 346 | .swagger-ui table tbody tr td { 347 | font-size: 0.8em; 348 | } 349 | 350 | code { 351 | padding: 0 0.2em; 352 | background: var(--main-text-color); 353 | color: var(--second-text-color); 354 | border-radius: 0.2em; 355 | } 356 | 357 | .swagger-ui .expand-methods svg, 358 | .swagger-ui .expand-operation svg { 359 | fill: var(--main-text-color); 360 | } --------------------------------------------------------------------------------