Skip to content

Commit df594a7

Browse files
committed
Added documentation
1 parent 5e81bee commit df594a7

5 files changed

Lines changed: 233 additions & 74 deletions

File tree

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# OpenHardware Initiative Website
2+
3+
This is the official website for the OpenHardware Initiative, a student-led group at TUM focused on hardware acceleration, chip design, and smart manufacturing systems.
4+
5+
## 🚀 Project Overview
6+
- **Modern React website** built with Vite, TypeScript, and Tailwind CSS
7+
- **Static data** managed in TypeScript files (no database required)
8+
- **Fully responsive** and mobile-friendly
9+
- **Easy to maintain**: add or edit data by changing files in `src/data/`
10+
- **SPA routing** with React Router, including GitHub Pages support
11+
12+
## 🗂️ Repository Structure
13+
14+
```
15+
/
16+
├── Source code/ # Main website source (React, Vite, etc.)
17+
│ ├── src/ # App source code
18+
│ │ ├── components/ # React components
19+
│ │ ├── data/ # All data (people, events, projects)
20+
│ │ ├── pages/ # Page components
21+
│ │ └── ...
22+
│ ├── public/ # Static assets (images, uploads, etc.)
23+
│ ├── ...
24+
│ └── ...
25+
├── media/ # Additional media assets
26+
├── lovable-uploads/ # Uploaded images
27+
├── ...
28+
```
29+
30+
## 🛠️ Tech Stack
31+
- [React](https://react.dev/)
32+
- [Vite](https://vitejs.dev/)
33+
- [TypeScript](https://www.typescriptlang.org/)
34+
- [Tailwind CSS](https://tailwindcss.com/)
35+
- [Bun](https://bun.sh/) (for local development/build)
36+
37+
## 📦 Data Management
38+
- All data is in `Source code/src/data/` as TypeScript files
39+
- See `DATA_MANAGEMENT_README.md` for details on adding/editing data
40+
41+
## 🏗️ Building & Deploying
42+
1. **Build the site:**
43+
```sh
44+
cd "Source code"
45+
bun run build
46+
```
47+
2. **Move the build output:**
48+
```sh
49+
mv dist/* ../
50+
mv dist/.* ../ 2>/dev/null || true
51+
rm -rf dist
52+
```
53+
3. **Commit and push to GitHub**
54+
55+
See `DEPLOYMENT_README.md` for full instructions.
56+
57+
## 🌐 Hosting
58+
- Designed for GitHub Pages, but can be hosted on Vercel, Netlify, etc.
59+
- SPA routing is supported everywhere (see Vite config and `_redirects`/`vercel.json`)
60+
61+
## 🤝 Contributing
62+
- Open to student and alumni contributions!
63+
- Please open an issue or pull request for improvements or bug fixes.
64+
65+
## 📄 License
66+
MIT License
67+
68+
---
69+
70+
For more details, see the documentation files in the repo.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Data Management Guide
2+
3+
This website uses static TypeScript files in the `src/data/` folder to store all structured content, such as events, people, and projects. You can easily add, remove, or update data by editing these files. All changes will be automatically included the next time you build the site.
4+
5+
## Where is the data?
6+
7+
All data is located in:
8+
```
9+
Source code/src/data/
10+
```
11+
- `eventsData.ts` — Events and event details
12+
- `peopleData.ts` — Team members, alumni, and advisors
13+
- `projectsData.ts` — Projects and their details
14+
15+
## How to Add or Edit Data
16+
17+
1. **Open the relevant file** in `src/data/` for the type of data you want to change.
18+
- For team members or alumni: edit `peopleData.ts`
19+
- For events: edit `eventsData.ts`
20+
- For projects: edit `projectsData.ts`
21+
22+
2. **Add a new entry** by copying an existing object and updating its fields, or edit/remove existing entries as needed.
23+
- Each file contains an array of objects. Each object represents a person, event, or project.
24+
- Make sure to follow the structure of the existing objects (field names, types, etc.).
25+
26+
3. **Save the file.**
27+
28+
4. **Build or run the site** as usual. The new data will be automatically included.
29+
30+
## Example: Adding a New Team Member
31+
32+
Open `peopleData.ts` and add a new object to the `peopleData` array:
33+
```typescript
34+
{
35+
id: "13",
36+
name: "Jane Doe",
37+
role: "Team Member",
38+
image: "/media/team/jane-doe.jpg",
39+
linkedIn: "https://linkedin.com/in/jane-doe/",
40+
education: "M.Sc. Computer Engineering, TUM",
41+
isActive: true,
42+
joinDate: "2024-07"
43+
},
44+
```
45+
46+
## Tips
47+
- **Use unique IDs** for each entry.
48+
- **Image paths** should point to files in the `public/media/` or `public/lovable-uploads/` folders.
49+
- **No need to restart the dev server** if it's already running; just refresh the page to see changes.
50+
- **Type safety:** If you make a typo or use the wrong field, TypeScript will show an error during build or in your editor.
51+
52+
## That's it!
53+
All data is managed through these files. No database or CMS is required—just edit, save, and build!

Source code/DEPLOYMENT_README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Building and Deploying the Website with Bun & GitHub Pages
2+
3+
This guide explains how to compile your React website using Bun and deploy it to GitHub Pages. It also covers how to move the build output to the correct location for GitHub Pages hosting.
4+
5+
---
6+
7+
## 1. Build the Website with Bun
8+
9+
1. **Open a terminal** and navigate to the `Source code` directory:
10+
```sh
11+
cd "Source code"
12+
```
13+
14+
2. **Run the build command:**
15+
```sh
16+
bun run build
17+
```
18+
This will generate a `dist/` folder inside the `Source code` directory containing the production-ready website files.
19+
20+
---
21+
22+
## 2. Move the Build Output for GitHub Pages
23+
24+
GitHub Pages expects the static site files to be in the root of your repository (or in a `docs/` folder if configured). To deploy from the root, move the contents of the `dist/` folder up one level:
25+
26+
1. **Move the build output:**
27+
```sh
28+
mv dist/* ../
29+
mv dist/.* ../ 2>/dev/null || true
30+
rm -rf dist
31+
```
32+
This moves all files (including hidden files like `.nojekyll`) from `Source code/dist/` to the root of your repository and removes the now-empty `dist/` folder.
33+
34+
---
35+
36+
## 3. Commit and Push to GitHub
37+
38+
1. **Go to the root of your repository:**
39+
```sh
40+
cd ..
41+
```
42+
2. **Add, commit, and push your changes:**
43+
```sh
44+
git add .
45+
git commit -m "Deploy website build"
46+
git push
47+
```
48+
49+
---
50+
51+
## 4. Check Your GitHub Pages Settings
52+
53+
- Make sure GitHub Pages is set to deploy from the root (`/`) of your repository (or from `/docs` if you use that folder).
54+
- The site should be live at `https://<your-username>.github.io/<your-repo>/` after a few minutes.
55+
56+
---
57+
58+
## Notes
59+
- **Always move the build output out of the `Source code` folder** before deploying, or GitHub Pages will not find your site files.
60+
- If you use a custom domain, make sure your `CNAME` file is also in the root directory.
61+
- For automated deployment, see the provided GitHub Actions workflow in `.github/workflows/`.
62+
63+
---
64+
65+
That's it! Your site is now built with Bun and deployed to GitHub Pages.

Source code/README.md

Lines changed: 44 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,44 @@
1-
# Welcome to your Lovable project
2-
3-
## Project info
4-
5-
**URL**: https://lovable.dev/projects/83ed3576-c44b-4c16-9f63-cd21c147de3e
6-
7-
## How can I edit this code?
8-
9-
There are several ways of editing your application.
10-
11-
**Use Lovable**
12-
13-
Simply visit the [Lovable Project](https://lovable.dev/projects/83ed3576-c44b-4c16-9f63-cd21c147de3e) and start prompting.
14-
15-
Changes made via Lovable will be committed automatically to this repo.
16-
17-
**Use your preferred IDE**
18-
19-
If you want to work locally using your own IDE, you can clone this repo and push changes. Pushed changes will also be reflected in Lovable.
20-
21-
The only requirement is having Node.js & npm installed - [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
22-
23-
Follow these steps:
24-
25-
```sh
26-
# Step 1: Clone the repository using the project's Git URL.
27-
git clone <YOUR_GIT_URL>
28-
29-
# Step 2: Navigate to the project directory.
30-
cd <YOUR_PROJECT_NAME>
31-
32-
# Step 3: Install the necessary dependencies.
33-
npm i
34-
35-
# Step 4: Start the development server with auto-reloading and an instant preview.
36-
npm run dev
37-
```
38-
39-
**Edit a file directly in GitHub**
40-
41-
- Navigate to the desired file(s).
42-
- Click the "Edit" button (pencil icon) at the top right of the file view.
43-
- Make your changes and commit the changes.
44-
45-
**Use GitHub Codespaces**
46-
47-
- Navigate to the main page of your repository.
48-
- Click on the "Code" button (green button) near the top right.
49-
- Select the "Codespaces" tab.
50-
- Click on "New codespace" to launch a new Codespace environment.
51-
- Edit files directly within the Codespace and commit and push your changes once you're done.
52-
53-
## What technologies are used for this project?
54-
55-
This project is built with:
56-
57-
- Vite
58-
- TypeScript
59-
- React
60-
- shadcn-ui
61-
- Tailwind CSS
62-
63-
## How can I deploy this project?
64-
65-
Simply open [Lovable](https://lovable.dev/projects/83ed3576-c44b-4c16-9f63-cd21c147de3e) and click on Share -> Publish.
66-
67-
## Can I connect a custom domain to my Lovable project?
68-
69-
Yes, you can!
70-
71-
To connect a domain, navigate to Project > Settings > Domains and click Connect Domain.
72-
73-
Read more here: [Setting up a custom domain](https://docs.lovable.dev/tips-tricks/custom-domain#step-by-step-guide)
1+
# OpenHardware Initiative Website — Source Code
2+
3+
This folder contains the full source code for the OpenHardware Initiative website.
4+
5+
## 📁 Structure
6+
- `src/` — Main app source code
7+
- `components/` — React UI components
8+
- `data/` — All data (people, events, projects)
9+
- `pages/` — Page components
10+
- `...`
11+
- `public/` — Static assets (images, uploads, etc.)
12+
13+
## 🛠️ Development
14+
- Built with [React](https://react.dev/), [Vite](https://vitejs.dev/), [TypeScript](https://www.typescriptlang.org/), [Tailwind CSS](https://tailwindcss.com/), and [Bun](https://bun.sh/)
15+
- All data is managed in `src/data/` as TypeScript files
16+
- No database or CMS required
17+
18+
## 📦 Data Management
19+
See [`../DATA_MANAGEMENT_README.md`](../DATA_MANAGEMENT_README.md) for how to add or edit people, events, or projects.
20+
21+
## 🏗️ Building & Deploying
22+
See [`../DEPLOYMENT_README.md`](../DEPLOYMENT_README.md) for how to build and deploy the site with Bun and GitHub Pages.
23+
24+
## ⚡ Quick Start
25+
1. Install dependencies (if needed):
26+
```sh
27+
bun install
28+
```
29+
2. Start the dev server:
30+
```sh
31+
bun run dev
32+
```
33+
3. Build for production:
34+
```sh
35+
bun run build
36+
```
37+
38+
## 📝 Notes
39+
- SPA routing is supported for GitHub Pages, Vercel, and Netlify
40+
- All application links are managed via `src/config/applicationConfig.ts`
41+
42+
---
43+
44+
For more, see the main repo README and the documentation files.

Source code/src/pages/Contact.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const Contact = () => {
9696
<h3 className="font-bold">GitHub</h3>
9797
<p className="text-gray-600 mb-2">Check out our projects</p>
9898
<a
99-
href="https://github.com"
99+
href="https://github.com/OpenHardware-Initiative"
100100
target="_blank"
101101
rel="noopener noreferrer"
102102
className="text-primary-blue hover:underline inline-block"

0 commit comments

Comments
 (0)