Преглед изворни кода

Initial commit

Add Web app package from Create Next App.
master
Allan Crisostomo пре 3 година
комит
e8155b02aa
17 измењених фајлова са 5733 додато и 0 уклоњено
  1. +11
    -0
      .editorconfig
  2. +93
    -0
      .gitignore
  3. +30
    -0
      REQUIREMENTS.md
  4. +31
    -0
      packages/app-web/.gitignore
  5. +1
    -0
      packages/app-web/README.md
  6. +12
    -0
      packages/app-web/jest.config.js
  7. +2
    -0
      packages/app-web/next-env.d.ts
  8. +28
    -0
      packages/app-web/package.json
  9. +8
    -0
      packages/app-web/src/components/templates/CreateRingtone/index.test.tsx
  10. +9
    -0
      packages/app-web/src/components/templates/CreateRingtone/index.tsx
  11. +5
    -0
      packages/app-web/src/pages/_app.tsx
  12. +51
    -0
      packages/app-web/src/pages/_document.tsx
  13. +13
    -0
      packages/app-web/src/pages/index.tsx
  14. +12
    -0
      packages/app-web/src/pages/my/create/ringtone/index.tsx
  15. +30
    -0
      packages/app-web/tsconfig.json
  16. +6
    -0
      packages/app-web/tsconfig.test.json
  17. +5391
    -0
      packages/app-web/yarn.lock

+ 11
- 0
.editorconfig Прегледај датотеку

@@ -0,0 +1,11 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = tab
indent_style = tab
insert_final_newline = true
max_line_length = 120
tab_width = 2
trim_trailing_whitespace = true

+ 93
- 0
.gitignore Прегледај датотеку

@@ -0,0 +1,93 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
pids
*.pid
*.seed
*.pid.lock
lib-cov
coverage
*.lcov
.nyc_output
.grunt
bower_components
.lock-wscript
build/Release
node_modules/
jspm_packages/
web_modules/
*.tsbuildinfo
.npm
.eslintcache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
.node_repl_history
*.tgz
.yarn-integrity
.env
.env.test
.cache
.parcel-cache
.next
out
.nuxt
dist
.cache/
.vuepress/dist
.serverless/
.fusebox/
.dynamodb/
.tern-port
.vscode-test
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk
.idea/
cmake-build-*/
*.iws
out/
.idea_modules/
atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
.idea/httpRequests
.idea/caches/build_file_checksums.ser
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

+ 30
- 0
REQUIREMENTS.md Прегледај датотеку

@@ -0,0 +1,30 @@
# Requirements

- As a client, I want to log in to the service.
- [ ] In the front-end, the client requests login by providing a username and a password to the back-end.
- [ ] In the back-end, the server processes the login request from the front-end.
- As a client, I want to log out from the service.
- [ ] In the front-end, the client requests logout to the backend.
- [ ] In the back-end, the server processes the logout request from the front-end.
- As a client, I want to search for available ringtones.
- [ ] In the front-end, the client requests ringtones by providing a search keyword to the back-end.
- [ ] In the back-end, the server retrieves the ringtones whose name matches the search keyword provided by the
front-end.
- As a client, I want to download a ringtone.
- [ ] In the front-end, the client requests the data of a ringtone from the back-end.
- [ ] In the back-end, the server sends the ringtone data to the front-end.
- As a client, I want to search for composers.
- [ ] In the front-end, the client requests composers by providing a search keyword to the back-end.
- [ ] In the back-end, the server retrieves the composers whose name matches the search keyword provided by the
front-end.
- As a composer, I want to create a ringtone.
- [ ] In the front-end, the client inputs ringtone data to the view.
- [ ] In the front-end, the client sends the ringtone data to the back-end.
- [ ] In the back-end, the server stores the ringtone.
- As a composer, I want to update a ringtone.
- [ ] In the front-end, the client modifies the ringtone data loaded on the view.
- [ ] In the front-end, the client sends the ringtone data to the back-end.
- [ ] In the back-end, the server stores the ringtone.
- As a composer, I want to delete a ringtone.
- [ ] In the front-end, the client requests deletion of a ringtone to the back-end.
- [ ] In the back-end, the server deletes the ringtone.

+ 31
- 0
packages/app-web/.gitignore Прегледај датотеку

@@ -0,0 +1,31 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env

# vercel
.vercel

+ 1
- 0
packages/app-web/README.md Прегледај датотеку

@@ -0,0 +1 @@
# Tonality Web App

+ 12
- 0
packages/app-web/jest.config.js Прегледај датотеку

@@ -0,0 +1,12 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.test.json',
},
},
collectCoverageFrom: [
'src/components/**/*.{jsx,tsx}',
]
};

+ 2
- 0
packages/app-web/next-env.d.ts Прегледај датотеку

@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />

+ 28
- 0
packages/app-web/package.json Прегледај датотеку

@@ -0,0 +1,28 @@
{
"name": "@tonality/app-web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"test": "jest"
},
"dependencies": {
"@tesseract-design/viewfinder": "^0.1.1",
"next": "10.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"styled-components": "^5.3.0"
},
"devDependencies": {
"@testing-library/react": "^11.2.6",
"@types/jest": "^26.0.23",
"@types/node": "^15.0.2",
"@types/react": "^17.0.5",
"@types/styled-components": "^5.1.9",
"jest": "^26.6.3",
"ts-jest": "^26.5.6",
"typescript": "^4.2.4"
}
}

+ 8
- 0
packages/app-web/src/components/templates/CreateRingtone/index.test.tsx Прегледај датотеку

@@ -0,0 +1,8 @@
import CreateRingtoneTemplate from '.'
import { render } from '@testing-library/react'

describe('template for creating ringtones', () => {
it('should render without crashing', () => {
expect(() => render(<CreateRingtoneTemplate />)).not.toThrow()
})
})

+ 9
- 0
packages/app-web/src/components/templates/CreateRingtone/index.tsx Прегледај датотеку

@@ -0,0 +1,9 @@
const CreateRingtoneTemplate = () => {
return (
<div>
CreateRingtone
</div>
)
}

export default CreateRingtoneTemplate

+ 5
- 0
packages/app-web/src/pages/_app.tsx Прегледај датотеку

@@ -0,0 +1,5 @@
const MyApp = ({Component, pageProps}) => {
return <Component {...pageProps} />
}

export default MyApp;

+ 51
- 0
packages/app-web/src/pages/_document.tsx Прегледај датотеку

@@ -0,0 +1,51 @@
import Document, {Html, Head, Main, NextScript} from 'next/document';
import {ServerStyleSheet} from 'styled-components';

export default class MyDocument extends Document {
static async getInitialProps(ctx) {
const sheet = new ServerStyleSheet();
const originalRenderPage = ctx.renderPage;

try {
ctx.renderPage = () =>
originalRenderPage({
enhanceApp: (App) => (props) =>
sheet.collectStyles(
<App
{...props}
/>,
),
});

const initialProps = await Document.getInitialProps(ctx);

return {
...initialProps,
styles: (
<>
{initialProps.styles}
{sheet.getStyleElement()}
</>
),
};
} catch (err) {
console.error(err);
} finally {
sheet.seal();
}
}

render() {
return (
<Html
lang="en-PH"
>
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}

+ 13
- 0
packages/app-web/src/pages/index.tsx Прегледај датотеку

@@ -0,0 +1,13 @@
import {NextPage} from 'next';

type Props = {}

const IndexPage: NextPage<Props> = () => {
return (
<div>
Hello
</div>
);
};

export default IndexPage;

+ 12
- 0
packages/app-web/src/pages/my/create/ringtone/index.tsx Прегледај датотеку

@@ -0,0 +1,12 @@
import {NextPage} from 'next'
import CreateRingtoneTemplate from '../../../../components/templates/CreateRingtone'

type Props = {}

const MyCreateRingtonePage: NextPage<Props> = () => {
return (
<CreateRingtoneTemplate />
)
}

export default MyCreateRingtonePage

+ 30
- 0
packages/app-web/tsconfig.json Прегледај датотеку

@@ -0,0 +1,30 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"exclude": [
"node_modules"
],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
]
}

+ 6
- 0
packages/app-web/tsconfig.test.json Прегледај датотеку

@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx"
}
}

+ 5391
- 0
packages/app-web/yarn.lock
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


Loading…
Откажи
Сачувај