|
| 1 | +# DEVS x SESA Beginner Hackathon 2026 |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <img width="450" alt="header" src="public/read-me-header.png" /> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <img src="https://img.shields.io/badge/HTML-E34F26?logo=html5&logoColor=white&style=for-the-badge" /> |
| 9 | + <img src="https://img.shields.io/badge/CSS-1572B6?logo=css&logoColor=white&style=for-the-badge&v=1" /> |
| 10 | + <img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white&style=for-the-badge" /> |
| 11 | + <img src="https://img.shields.io/badge/React-61DAFB?logo=react&logoColor=black&style=for-the-badge" /> |
| 12 | + <img src="https://img.shields.io/badge/Node.js-25.x-green?logo=node.js&logoColor=white&style=for-the-badge" /> |
| 13 | +</p> |
| 14 | + |
| 15 | +## 💻 About |
| 16 | + |
| 17 | +Hi 😊! This is the template repository for the DEVS x SESA Beginners Hackathon 2026. You’re welcome to make any changes, and you don’t have to stick with everything provided here. This is simply a starter using HTML/CSS/TypeScript that you can build on. |
| 18 | + |
| 19 | +If you have any questions, don’t hesitate to ask for help! Otherwise, we wish you all the best and hope you have a great time ❤️! |
| 20 | + |
| 21 | +## 🚀 Getting Started |
| 22 | + |
| 23 | +**1. Clone the Repository** |
| 24 | + |
| 25 | +```bash |
| 26 | +git clone <your-repo-url> |
| 27 | +``` |
| 28 | + |
| 29 | +**2. Open the Project** |
| 30 | + |
| 31 | +Open the folder in your preferred editor. |
| 32 | + |
| 33 | +**3. Install Dependencies** |
| 34 | + |
| 35 | +Open the terminal inside your editor (or an external terminal!) and run the following command from the root directory: |
| 36 | + |
| 37 | +```bash |
| 38 | +npm install |
| 39 | +``` |
| 40 | + |
| 41 | +**4. Run** |
| 42 | + |
| 43 | +From the same directory, run the following command to start the app. You can then access it in your browser at the URL shown in the terminal (usually `http://localhost:5173`). |
| 44 | + |
| 45 | +```bash |
| 46 | +npm run dev |
| 47 | +``` |
| 48 | + |
| 49 | +## ⚛️ React Fundamentals |
| 50 | + |
| 51 | +### Components |
| 52 | + |
| 53 | +Reusable components live in the `src/components/` folder. Components are simply functions that return JSX - which is just HTML-like syntax that describes what to show on screen. |
| 54 | + |
| 55 | +A sample component that takes in a string/text and displays it would look something like this: |
| 56 | + |
| 57 | +```typescript |
| 58 | +function MyComponent({ text }: { text: string }) { |
| 59 | + return ( |
| 60 | + <div> |
| 61 | + <h1>{text}</h1> |
| 62 | + </div> |
| 63 | + ) |
| 64 | +} |
| 65 | + |
| 66 | +export default MyComponent |
| 67 | +``` |
| 68 | + |
| 69 | +#### Styling |
| 70 | + |
| 71 | +To style a component, create a `.module.css` file next to it and import it. For example, in `MyComponent.module.css`: |
| 72 | + |
| 73 | +```css |
| 74 | +.title { |
| 75 | + color: coral; |
| 76 | +} |
| 77 | +``` |
| 78 | + |
| 79 | +Then we can use it in our component with `className={styles.title}`, to style our text coral: |
| 80 | + |
| 81 | +```typescript |
| 82 | +import styles from "./MyComponent.module.css" |
| 83 | + |
| 84 | +function MyComponent({ text }: { text: string }) { |
| 85 | + return <h1 className={styles.title}>{text}</h1> |
| 86 | +} |
| 87 | +``` |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +### Pages |
| 92 | + |
| 93 | +Pages live in the `src/pages/` folder, each in its own folder (i.e. `src/pages/home/`). Pages are just components, however they often contain multiple components! Think of a page being a webpage that embeds multiple components! |
| 94 | + |
| 95 | +For example, a page could use the `MyComponent` component above twice with different text: |
| 96 | + |
| 97 | +```typescript |
| 98 | +import MyComponent from "../../components/MyComponent" |
| 99 | + |
| 100 | +function MyPage() { |
| 101 | + return ( |
| 102 | + <div> |
| 103 | + <MyComponent text="Hello!" /> |
| 104 | + <MyComponent text="Welcome to my website!" /> |
| 105 | + </div> |
| 106 | + ) |
| 107 | +} |
| 108 | + |
| 109 | +export default MyPage |
| 110 | +``` |
| 111 | + |
| 112 | +This creates a webpage that displays "Hello!" and "Welcome to my website!" in coral text 🪸 |
| 113 | + |
| 114 | +## 🌲 Project Structure |
| 115 | + |
| 116 | +#### `main.tsx` |
| 117 | + |
| 118 | +This file largely doesn't need to be touched! It's the entry point of the app 😄. |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +#### `App.tsx` |
| 123 | + |
| 124 | +This is where routing lives. It maps URLs to pages. `/` shows `Home`, `/about` shows `About`. |
| 125 | + |
| 126 | +If you want to add a new page, this is the place to do it! Create a new folder in `pages/`, import it here, and add a new <Route> pointing to it. |
| 127 | + |
| 128 | +```typescript |
| 129 | +import PageName from "./pages/page-name/PageName"; |
| 130 | + |
| 131 | +// Then inside <Routes> |
| 132 | +<Route path="/your-path" element={<PageName />} /> |
| 133 | +``` |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +#### `Home.tsx` |
| 138 | + |
| 139 | +The landing page. Displays the DEVS x SESA banner with the logo, three info cards, and a button to the API example page. |
| 140 | + |
| 141 | +--- |
| 142 | + |
| 143 | +#### `ApiExample.tsx` |
| 144 | + |
| 145 | +A page that demonstrates how to fetch data from an API. It uses the [PokeAPI](https://pokeapi.co/) to fetch a random Pokemon when a button is pressed. The left side shows the steps, the right side lets you try it out. |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +#### `Button.tsx` |
| 150 | + |
| 151 | +A reusable pill-shaped button component that links to a page. Takes `text` and `to` as input. |
| 152 | + |
| 153 | +```typescript |
| 154 | +<Button text="Click Me" to="/some-page" /> |
| 155 | +``` |
| 156 | + |
| 157 | +## 🌏 Deployment |
| 158 | + |
| 159 | +Your repository is automatically deployed via GitHub Pages. This means that it is live, and every time your main branch is updated, the site will be rebuilt and redeployed automatically! |
0 commit comments