A simple PC builder from scratch to determine the budget range of your selected components created using React
with TypeScript
and deployed using Netlify
.
-
Download the latest Node version. This is marked as
<version number> Current
. Install it on your machine. -
(Optional) Download Yarn. This is a faster package manager than the default
npm
one. -
Clone the project
git clone https://github.com/RinMinase/pc-builder.git cd pc-builder
-
Install the dependencies then run the project
npm install npm start
Note: If you have installed Yarn, run these instead:
yarn install yarn start
-
Fire up your browser and go to
localhost:3000
.
βββ assets/ # Project assets
βββ src/ # Project source code
β βββ core/ # Core components
β βββ <component>/ # Project component
β βββ global.d.ts # Project type definitions
β βββ global.scss # Main stylesheet
β βββ index.html # Main template file
β βββ index.tsx # Main scripts
β βββ reducers.ts # Root reducer file
β βββ routes.tsx # Route definitions
βββ tsconfig.json # TypeScript configuration file
βββ webpack.config.ts # Webpack configuration file
<component>/
β βββ components/ # Sub-components folder
β βββ <component name>.tsx # Sub-component
βββ actions.tsx # Component actions and types
βββ index.scss # Component stylesheet
βββ index.tsx # Component entry file
βββ reducers.tsx # Component reducers
___________________
| _______________ | <App />
| |_______________| | ββ <Nav />
| _______________ | β
| | | | ββ <Container />
| | | | ββ <Route />
| |_______________| |
|___________________|
Installations Required:
- Node
- (Optional) Yarn
-
Fire up your terminal inside the project folder.
-
Build the project by running:
npm run build
Note: If you have installed Yarn, run these instead:
yarn build
-
This should generate a
/dist
folder inside the project folder.
Task automation is based on Yarn scripts or NPM scripts.
Task | Description |
---|---|
yarn start |
Run development server on http://localhost:3000/ with file watching on changes |
yarn build |
Build production code |
yarn deploy |
Build netlify deployment code |
- React 16 - Web Framework
- Redux - State Container Management
- TypeScript - Language syntax and compiler
- Material-UI - Web Layouting
- Firestore - Database
- Sassy CSS (SCSS) - CSS pre-processor
- Webpack 4 - Project bundler
- Netlify - Continuous Deployment (CD) service
- Terser - ES6+ (JavaScript) mangler and compression toolkit
- Yarn - Package Manager