@@ -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 |
@@ -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 |
@@ -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. |
@@ -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 |
@@ -0,0 +1 @@ | |||||
# Tonality Web App |
@@ -0,0 +1,12 @@ | |||||
module.exports = { | |||||
preset: 'ts-jest', | |||||
testEnvironment: 'jsdom', | |||||
globals: { | |||||
'ts-jest': { | |||||
tsconfig: '<rootDir>/tsconfig.test.json', | |||||
}, | |||||
}, | |||||
collectCoverageFrom: [ | |||||
'src/components/**/*.{jsx,tsx}', | |||||
] | |||||
}; |
@@ -0,0 +1,2 @@ | |||||
/// <reference types="next" /> | |||||
/// <reference types="next/types/global" /> |
@@ -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" | |||||
} | |||||
} |
@@ -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() | |||||
}) | |||||
}) |
@@ -0,0 +1,9 @@ | |||||
const CreateRingtoneTemplate = () => { | |||||
return ( | |||||
<div> | |||||
CreateRingtone | |||||
</div> | |||||
) | |||||
} | |||||
export default CreateRingtoneTemplate |
@@ -0,0 +1,5 @@ | |||||
const MyApp = ({Component, pageProps}) => { | |||||
return <Component {...pageProps} /> | |||||
} | |||||
export default MyApp; |
@@ -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> | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,13 @@ | |||||
import {NextPage} from 'next'; | |||||
type Props = {} | |||||
const IndexPage: NextPage<Props> = () => { | |||||
return ( | |||||
<div> | |||||
Hello | |||||
</div> | |||||
); | |||||
}; | |||||
export default IndexPage; |
@@ -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 |
@@ -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" | |||||
] | |||||
} |
@@ -0,0 +1,6 @@ | |||||
{ | |||||
"extends": "./tsconfig.json", | |||||
"compilerOptions": { | |||||
"jsx": "react-jsx" | |||||
} | |||||
} |