Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
fix: restruturing schema changes,impl WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhaev26 committed Mar 14, 2024
1 parent 288af10 commit 01af52c
Show file tree
Hide file tree
Showing 78 changed files with 7,761 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apis/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
38 changes: 38 additions & 0 deletions apis/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off"
}
}
112 changes: 112 additions & 0 deletions apis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Users Environment Variables
.lock-wscript

# IDEs and editors (shamelessly copied from @angular/cli's .gitignore)
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# Others
lib/
data/
45 changes: 45 additions & 0 deletions apis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# api

> rest-apis for gcs
## About

This project uses [Feathers](http://feathersjs.com). An open source web framework for building modern real-time applications.

## Getting Started

Getting up and running is as easy as 1, 2, 3.

1. Make sure you have [NodeJS](https://nodejs.org/) and [npm](https://www.npmjs.com/) installed.
2. Install your dependencies

```
cd path/to/api
npm install
```
3. Start your app
```
npm start
```
## Testing
Simply run `npm test` and all your tests in the `test/` directory will be run.
## Scaffolding
Feathers has a powerful command line interface. Here are a few things it can do:
```
$ npm install -g @feathersjs/cli # Install Feathers CLI

$ feathers generate service # Generate a new Service
$ feathers generate hook # Generate a new Hook
$ feathers help # Show all commands
```
## Help
For more information on all the things you can do with Feathers visit [docs.feathersjs.com](http://docs.feathersjs.com).
32 changes: 32 additions & 0 deletions apis/config/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"host": "localhost",
"port": 3030,
"public": "../public/",
"paginate": {
"default": 10,
"max": 50
},
"authentication": {
"entity": "user",
"service": "users",
"secret": "X5BtMeTNrnrWWh46hp6uYj/Dtz8=",
"authStrategies": [
"jwt",
"local"
],
"jwtOptions": {
"header": {
"typ": "access"
},
"audience": "https://yourdomain.com",
"issuer": "feathers",
"algorithm": "HS256",
"expiresIn": "1d"
},
"local": {
"usernameField": "email",
"passwordField": "password"
}
},
"mongodb": "mongodb+srv://soubhik:[email protected]/?retryWrites=true&w=majority&appName=Sports"
}
4 changes: 4 additions & 0 deletions apis/config/production.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"host": "api-app.feathersjs.com",
"port": "PORT"
}
1 change: 1 addition & 0 deletions apis/config/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 9 additions & 0 deletions apis/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
diagnostics: false
}
}
};
76 changes: 76 additions & 0 deletions apis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "api",
"description": "rest-apis for gcs",
"version": "0.0.0",
"homepage": "",
"private": true,
"main": "src",
"keywords": [
"feathers"
],
"author": {
"name": "Soubhik Kumar Gon",
"email": "[email protected]"
},
"contributors": [],
"bugs": {},
"directories": {
"lib": "src",
"test": "test/",
"config": "config/"
},
"engines": {
"node": "^20.0.0",
"yarn": ">= 0.18.0"
},
"scripts": {
"test": "yarn run lint && yarn run compile && yarn run jest",
"lint": "eslint src/. test/. --config .eslintrc.json --ext .ts --fix",
"dev": "ts-node-dev --no-notify src/",
"start": "yarn run compile && node lib/",
"jest": "jest --forceExit",
"compile": "shx rm -rf lib/ && tsc"
},
"standard": {
"env": [
"jest"
],
"ignore": []
},
"types": "lib/",
"dependencies": {
"@feathersjs/authentication": "^4.5.15",
"@feathersjs/authentication-local": "^4.5.15",
"@feathersjs/authentication-oauth": "^4.5.15",
"@feathersjs/configuration": "^4.5.15",
"@feathersjs/errors": "^4.5.15",
"@feathersjs/express": "^4.5.15",
"@feathersjs/feathers": "^4.5.15",
"@feathersjs/socketio": "^4.5.15",
"@feathersjs/transport-commons": "^5.0.24",
"compression": "^1.7.4",
"cors": "^2.8.5",
"feathers-mongoose": "^8.5.1",
"helmet": "^5.1.0",
"mongodb-core": "^3.2.7",
"mongoose": "^6.3.6",
"serve-favicon": "^2.5.0",
"winston": "^3.0.0"
},
"devDependencies": {
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.17",
"@types/jest": "^29.5.12",
"@types/jsonwebtoken": "^9.0.6",
"@types/serve-favicon": "^2.5.7",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"axios": "^1.6.7",
"eslint": "^8.17.0",
"jest": "^29.7.0",
"shx": "^0.3.4",
"ts-jest": "^29.1.2",
"ts-node-dev": "^2.0.0",
"typescript": "^4.7.3"
}
}
Binary file added apis/public/favicon.ico
Binary file not shown.
Loading

0 comments on commit 01af52c

Please sign in to comment.