diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..cb051c6 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,32 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:import/errors", + "plugin:react/recommended", + "plugin:jsx-a11y/recommended" + ], + "plugins": ["react", "import", "jsx-a11y"], + "rules": { + "react/prop-types": 0, + "indent": ["error", 2], + "linebreak-style": 1 + }, + "parserOptions": { + "ecmaVersion": 2021, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "env": { + "es6": true, + "browser": true, + "node": true + }, + "settings": { + "react": { + "version": "detect" + } + } + } + \ No newline at end of file diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 0000000..32cb774 --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,45 @@ +name: Eslint Check + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + eslint: + name: Eslint Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8.6.0 + + - name: Use Dev Cache + id: dev-cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install Dependencies + if: steps.dev-cache.outputs.cache-hit != 'true' + run: pnpm install + + - name: Eslint Check + run: pnpm lint + continue-on-error: false diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..dcdf386 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,44 @@ +name: Prettier Check + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + prettier-check: + name: Check Code Formatting with Prettier + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8.6.0 + + - name: Use Dev Cache + id: dev-cache + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install Dependencies + if: steps.dev-cache.outputs.cache-hit != 'true' + run: pnpm install + + - name: Run Prettier Check + run: pnpm run prettier diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c267e25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,157 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# lock files +pnpm-lock.yaml +package-lock.json + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..89fd196 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "trailingComma": "none", + "semi": false, + "singleQuote": true, + "printWidth": 100 +} \ No newline at end of file diff --git a/README.md b/README.md index a6ec898..854bff8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,236 @@ -# project-vanilla -Repository for AICHE fest. + + +[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) + + + +[![Starware](https://img.shields.io/badge/Starware-โญ-black?labelColor=f9b00d)](https://github.com/zepfietje/starware) + + + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] +[![MIT License][license-shield]][license-url] + +## DSC NIT Rourkela + +[![DSC NIT Rourkela][dsc-nitrourkela]](https://dscnitrourkela.org) + +

Project Huckleberry

+ +

+ Future Website of DSC NIT Rourkela +
+
+ View Demo + ยท + Report Webapp Bugs + . + Report Server Bugs +

+

+ + +
+ Table of Contents +
    +
  1. + About The Project +
      +
    +
  2. Built With
  3. + + +
  4. + Getting Started + +
  5. +
  6. Roadmap
  7. +
  8. License
  9. +
  10. Starware
  11. +
  12. Contributors
  13. +
+
+ +## About The Project + +### Built With + +Following technologies and libraries are used for the development of this +project. + +- [Next.js](https://nextjs.org/) +- [Styled-Components](https://styled-components.com/) + + + +## Getting Started + +To setup the project locally follow the steps below + +### Prerequisites + +- [Node.js](https://nodejs.org/en/download/) + + ```sh + # Homebrew + brew install nodejs + + # Sudo apt + sudo apt install nodejs + + # Packman + pacman -S nodejs + + # Module Install + dnf module install nodejs: # stream is the version + + # Windows (chocolaty) + cinst nodejs.install + + ``` + +- [pnpm](https://classic.pnpmpkg.com/en/docs/install/) + + ```sh + npm install -g pnpm + ``` + +- [Git](https://git-scm.com/downloads) + + ```sh + # Homebrew + brew install git + + # Sudo apt + apt-get install git + + # Packman + pacman -S git + + # Module Install (Fedora) + dnf install git + + ``` + +### Contribution guidelines ๐ŸŽƒ + +--- + +Our Slack Community: [Slack Invite](http://bit.ly/NITRDevs)
+ +`Contributions are welcome ๐ŸŽ‰๐ŸŽ‰` + +### Local Repository Setup + +Please refer to the project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow. + +1. **Fork** the repo on GitHub +2. **Clone** the project to your local system +3. **Commit** changes to your own separate branch +4. **Push** your work back up to your fork +5. Submit a **Pull request** so that we can review your changes + +NOTE 1: Please abide by the [Contributing Guidelines](https://github.com/dscnitrourkela/project-huckleberry/blob/main/CONTRIBUTING.md). + +NOTE 2: Please abide by the [Code of Conduct](https://github.com/dscnitrourkela/project-huckleberry/blob/main/CODE_OF_CONDUCT.md). + +NOTE 3: We follow the following [coventional commit types](https://github.com/pvdlg/conventional-commit-types) + +### Running the project. + +The project uses pnpm and not NPM. It is strictly advised to stick with pnpm so as to avoid dependency conflicts down the line. + +``` +## switch to new branch +git checkout -b + +## Install Dependencies +pnpm install + +## Run the Project +pnpm start + +### For ESlint checks +pnpm lint +### For Prettier checks +pnpm prettier + +## Build the app for production +pnpm build + +``` + +Following are the commands to remove/add new dependencies using pnpm + +``` +## Add a new Package +pnpm add package_name + +## Remove an existing Package +pnpm remove package_name + +## Save Package as a Dev Dependency +pnpm add -D package_name +``` + +## Roadmap + +The following project is in its v1 stage. We are open to new features and suggestions. As of now, following are the features that we plan to integrate. + +- Set up time of distribution for automatice certificates distributions. +- Complaint management system for disputes. + +## License + +Distributed under the MIT License. See `LICENSE` for more information. + +## Starware + +Project-huckleberry is Starware. +This means you're free to use the project, as long as you star its GitHub repository. +Your appreciation makes us grow and glow up. โญ + +## Contributors โœจ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + +

Srishty M

๐Ÿšง ๐Ÿ“† ๐Ÿ“– ๐Ÿค” โš ๏ธ +

All Contributors

๐Ÿ”ง

actions-user

๐Ÿ”ง
+ + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! + + + + +[contributors-shield]: https://img.shields.io/github/contributors/dscnitrourkela/project-huckleberry?style=for-the-badge +[contributors-url]: https://github.com/dscnitrourkela/project-huckleberry/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/dscnitrourkela/project-huckleberry?style=for-the-badge +[forks-url]: https://github.com/dscnitrourkela/project-huckleberry/network/members +[stars-shield]: https://img.shields.io/github/stars/dscnitrourkela/project-huckleberry?style=for-the-badge +[stars-url]: https://github.com/dscnitrourkela/project-huckleberry/stargazers +[issues-shield]: https://img.shields.io/github/issues/dscnitrourkela/project-huckleberry?style=for-the-badge +[issues-url]: https://github.com/dscnitrourkela/project-huckleberry/issues +[license-shield]: https://img.shields.io/github/license/dscnitrourkela/project-huckleberry?style=for-the-badge +[license-url]: https://github.com/dscnitrourkela/project-huckleberry/blob/main/LICENSE +[dsc-nitrourkela]: images/RepoCover.png diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..bee6cef --- /dev/null +++ b/babel.config.json @@ -0,0 +1,8 @@ +{ + "presets": [ + "react-app" + ], + "plugins": [ + "babel-plugin-macros" + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..5fd7ce5 --- /dev/null +++ b/package.json @@ -0,0 +1,51 @@ +{ + "name": "project-vanilla", + "version": "0.1.0", + "type": "module", + "private": true, + "dependencies": { + "@testing-library/jest-dom": "^5.17.0", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^13.5.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.23.1", + "react-scripts": "5.0.1", + "styled-components": "^6.1.11", + "tailwindcss": "^3.4.3", + "twin.macro": "^3.4.1", + "web-vitals": "^2.1.4" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject", + "lint": "eslint \"src/**/*.{js,jsx}\"", + "lint:fix": "eslint \"src/**/*.{js,jsx}\" --fix", + "prettier": "prettier --check \"./**/*.{ts,tsx,js,jsx,css,scss,md}\" --ignore-path .gitignore", + "prettier:fix": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,scss,md}\" --ignore-pattern node_modules/" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "devDependencies": { + "babel-plugin-macros": "^3.1.0", + "prettier": "^3.3.0" + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..a11777c Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..aa069f2 --- /dev/null +++ b/public/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + React App + + + +
+ + + diff --git a/public/logo192.png b/public/logo192.png new file mode 100644 index 0000000..fc44b0a Binary files /dev/null and b/public/logo192.png differ diff --git a/public/logo512.png b/public/logo512.png new file mode 100644 index 0000000..a4e47a6 Binary files /dev/null and b/public/logo512.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..0bc1281 --- /dev/null +++ b/settings.json @@ -0,0 +1,11 @@ +// .vscode/settings.json +{ + "css.validate": false, + "scss.validate": false, + "less.validate": false, + "tailwindCSS.experimental.classRegex": [ + "tw`([^`]*)", + "tw\\.[^`]*`([^`]*)" + ] + } + \ No newline at end of file diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..4bc1a94 --- /dev/null +++ b/src/App.js @@ -0,0 +1,19 @@ +import React from 'react' +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom' +import Home from './pages/Home.js' +import Playground from './pages/Playground.js' +import NavBar from './components/marginals/navbar/NavBar.jsx' + +const App = () => { + return ( + + + + } /> + } /> + + + ) +} + +export default App diff --git a/src/components/SampleDiv.jsx b/src/components/SampleDiv.jsx new file mode 100644 index 0000000..fcbca7c --- /dev/null +++ b/src/components/SampleDiv.jsx @@ -0,0 +1,5 @@ +import React from "react"; + +export const SampleDiv = () => { + return
SampleDiv
; +}; diff --git a/src/components/marginals/footer/Footer.jsx b/src/components/marginals/footer/Footer.jsx new file mode 100644 index 0000000..6c261a9 --- /dev/null +++ b/src/components/marginals/footer/Footer.jsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Footer = () => { + return
Footer
; +}; + +export default Footer; diff --git a/src/components/marginals/navbar/NavBar.jsx b/src/components/marginals/navbar/NavBar.jsx new file mode 100644 index 0000000..f86f9ee --- /dev/null +++ b/src/components/marginals/navbar/NavBar.jsx @@ -0,0 +1,18 @@ +import { Link } from 'react-router-dom' +import React from 'react' +import { NavContainer, Items } from './navbar.styles' + +const NavBar = () => { + return ( + + + Home + + + Playground + + + ) +} + +export default NavBar diff --git a/src/components/marginals/navbar/navbar.styles.js b/src/components/marginals/navbar/navbar.styles.js new file mode 100644 index 0000000..ed95562 --- /dev/null +++ b/src/components/marginals/navbar/navbar.styles.js @@ -0,0 +1,20 @@ +import tw from 'twin.macro' +import styled from 'styled-components' + +export const NavContainer = styled.nav` + ${tw` + flex + flex-row + justify-center + items-center + bg-blue-500 + `} +` +export const Items = styled.li` + ${tw` + p-[1vw] + cursor-pointer + w-[8vw] + list-none + `} +` diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..ec2585e --- /dev/null +++ b/src/index.css @@ -0,0 +1,13 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..128f3e3 --- /dev/null +++ b/src/index.js @@ -0,0 +1,11 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App.js"; + +const root = ReactDOM.createRoot(document.getElementById("root")); +root.render( + + + +); diff --git a/src/pages/Home.js b/src/pages/Home.js new file mode 100644 index 0000000..9ef172b --- /dev/null +++ b/src/pages/Home.js @@ -0,0 +1,12 @@ +import React from "react"; + +const Home = () => { + return ( +
+

Home

+

This is the home page

+
+ ); +}; + +export default Home; diff --git a/src/pages/Playground.js b/src/pages/Playground.js new file mode 100644 index 0000000..2380fc4 --- /dev/null +++ b/src/pages/Playground.js @@ -0,0 +1,12 @@ +import React from "react"; + +const Playground = () => { + return ( +
+

Playground page

+

For testing purpose

+
+ ); +}; + +export default Playground; diff --git a/src/tailwind.css b/src/tailwind.css new file mode 100644 index 0000000..4ea6118 --- /dev/null +++ b/src/tailwind.css @@ -0,0 +1,4 @@ +/* src/tailwind.css */ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..0564fae --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,12 @@ +// tailwind.config.mjs +export default { + purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"], + darkMode: false, // or 'media' or 'class' + theme: { + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [], +};