Skip to content

Commit 6054d96

Browse files
committed
Update project to use Next.js (and configure mui, and sass so that both are available to use if desired).
1 parent 24d1186 commit 6054d96

28 files changed

+2997
-28471
lines changed

.gitignore

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
31
# dependencies
42
/node_modules
53
/.pnp
@@ -13,11 +11,27 @@
1311

1412
# misc
1513
.DS_Store
14+
15+
# local env files
16+
.local
1617
.env.local
1718
.env.development.local
1819
.env.test.local
1920
.env.production.local
21+
.dev
22+
.live_dev
23+
.prod
24+
.env
25+
.env.auth
26+
.env.assume
2027

28+
# ide
29+
.vs/
30+
.vscode
31+
32+
# debug
2133
npm-debug.log*
22-
yarn-debug.log*
23-
yarn-error.log*
34+
*.log
35+
36+
# next.js
37+
/.next/

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.next
2+
.vscode
3+
node_modules

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
printWidth: 120,
3+
singleQuote: true,
4+
tabWidth: 2,
5+
trailingComma: 'all',
6+
semi: false,
7+
}

README.md

+24-71
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
1. Fork this repository and clone the fork to your machine
1212
2. Install the dependencies `npm install`
13-
3. Start the application `npm start`
13+
3. Start the application in development mode `npm dev` (then open [http://localhost:3000](http://localhost:3000) to view it in your browser)
1414

1515
## Overview
1616

@@ -27,9 +27,12 @@ Using the provided Figma design and data files the application should:
2727

2828
#### What's provided
2929

30-
This repository contains the [Create React App](https://create-react-app.dev/) boilerplate code using the TypeScript template, a CSS reset, and the Mortal Kombot logo image. You are free to use any other boilerplate or React framework that uses TypeScript if you'd prefer.
30+
### NOTES
31+
I've added material-ui's baseline (to normalise styles between browsers). Feel free to replace with something like normalize.css if you'd prefer.
3132

32-
We've also put together a `.json` file containing all Character data (sourced from [DashFight](https://dashfight.com/) and [EventHubs](https://www.eventhubs.com/)) from various fighting games (Mortal Kombat, Street Fighter, Super Smash Bros. and Dragon Ball Z). You can import this file directly into your code to complete the challenge. You'll find this in the `./src/data` directory.
33+
This repository contains boilerplate code for a [Next.js](https://nextjs.org/) project using the Next.js Pages router, TypeScript, a CSS reset (via the Material-UI design library's Baseline component), and the Mortal Kombot logo image. You are free to use any other boilerplate or React framework that uses TypeScript if you'd prefer.
34+
35+
We've also put together a `.json` file containing all Character data (sourced from [DashFight](https://dashfight.com/) and [EventHubs](https://www.eventhubs.com/)) from various fighting games (Mortal Kombat, Street Fighter, Super Smash Bros. and Dragon Ball Z). You can import this file directly into your code to complete the challenge (this has been done inside the `pages/index.tsx` file). You'll find the data file located in the `./data` directory.
3336

3437
##### Figma design files
3538

@@ -39,86 +42,36 @@ We've also put together a `.json` file containing all Character data (sourced fr
3942

4043
#### Constraints
4144

42-
- 2–4 hours over ~5 days
4345
- React + TypeScript
4446

4547
## Expectations
4648

47-
**We do not expect you to spend more than 2–4 hours on the challenge**, and we understand that it's unrealistic to implement a complete and polished solution in this time frame. We also have intentionally built-in some poor usability patterns that we'd love for you to improve upon. If you feel there was more you could do to improve it by the end of this time, please add some notes about what you'd change. We'll discuss these with you in person (or video call). We are looking for good architectural decisions, modularity, readability, and adherence to industry best practices.
48-
49-
## Submission
50-
51-
Once you've finished you can send us the URL to your repository via email. If your repository is private let us know and we'll send you the GitHub accounts that will need access to review the submission.
52-
53-
You are free to open source your work if you like.
54-
55-
# Create React App Readme
56-
57-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
58-
59-
## Available Scripts
60-
61-
In the project directory, you can run:
62-
63-
### `npm start`
64-
65-
Runs the app in the development mode.\
66-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
67-
68-
The page will reload when you make changes.\
69-
You may also see any lint errors in the console.
70-
71-
### `npm test`
72-
73-
Launches the test runner in the interactive watch mode.\
74-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
49+
**We do not expect you to spend more than a few hours on the challenge**, and we understand that it's unrealistic to implement a complete and polished solution in this time frame.
7550

76-
### `npm run build`
51+
We have intentionally built-in some poor usability patterns that we'd love for you to either:
52+
a) improve upon, or
53+
b) suggest improvements, or
54+
c) even just point out an awareness of problems/issues would be valuable.
7755

78-
Builds the app for production to the `build` folder.\
79-
It correctly bundles React in production mode and optimizes the build for the best performance.
56+
If you feel there was more you could do to improve by the end of this time, please add some notes (e.g. dot points ) about what you'd change.
8057

81-
The build is minified and the filenames include the hashes.\
82-
Your app is ready to be deployed!
58+
We'll discuss these with you in person (or video call). We are looking for sensible structure, readability, and adherence to industry best practices.
8359

84-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
60+
## Styling
8561

86-
### `npm run eject`
62+
Note we're flexible on whatever approach to styling you want to use.
8763

88-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
64+
We've tried to setup a few options to make getting started easier/quicker, being:
65+
- global css/scss, or
66+
- css modules, or even
67+
- style props available in [Material UI](https://mui.com/material-ui/getting-started/)
8968

90-
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
69+
Feel free to add any other libraries if you have a preferred way of working (e.g. Tailwind).
9170

92-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
93-
94-
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
95-
96-
## Learn More
97-
98-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
99-
100-
To learn React, check out the [React documentation](https://reactjs.org/).
101-
102-
### Code Splitting
103-
104-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
105-
106-
### Analyzing the Bundle Size
107-
108-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
109-
110-
### Making a Progressive Web App
111-
112-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
113-
114-
### Advanced Configuration
115-
116-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
117-
118-
### Deployment
71+
## Submission
11972

120-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
73+
Once you've finished you can send us the URL to your repository via email. If your repository is private let us know and we'll send you the GitHub accounts that will need access to review the submission.
12174

122-
### `npm run build` fails to minify
75+
You are free to open source your work if you like.
12376

124-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
77+
Good luck, have fun!!! :D
File renamed without changes.
File renamed without changes.

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
output: 'export', // Outputs a Single-Page Application (SPA).
4+
images: {
5+
unoptimized: true,
6+
},
7+
}
8+
9+
export default nextConfig

0 commit comments

Comments
 (0)