-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create README.md * added contributing guide
- Loading branch information
1 parent
cbbfdef
commit a528155
Showing
2 changed files
with
165 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contributing | ||
|
||
First of all, a huge thank you for looking to contribute to this repository! This project was concieved and built at [FOSS Hack 4.0](https://fossunited.org/fosshack/2024), a hackathon for building open-source software. As such, everything from the folder structure to the code has been *hacked up* in a couple of hours. That is to say, this is messed up lol. There's tons of stuff to improve. | ||
|
||
## Improvements | ||
These are some of the stuff that we'd like to improve upon. | ||
|
||
### Switch to a different framework? | ||
Sure, why not! As said earlier, this was hacked up and we're not sure this is the best approach to build this portal. Right now, it works and that's all we know! If you find a way to overhaul it and make it better, maybe with a different framework, please do so and open a PR! | ||
|
||
> Note: If your work requires any changes with the API, please coordinate with us by [messaging me on telegram](https://t.me/vishalds/). | ||
### I'll write with pure HTML, CSS & JS | ||
Well get on it gigachad! We'll 100% take your solution over any framework. But if you're doing stuff like this, please make sure to maintain code quality. | ||
|
||
### Improve code quality | ||
If you can find places to refactor, improve code quality, or do any such thing, feel free to open a PR. We appreciate better and simpler code. | ||
|
||
## How to contribute? | ||
Simple, just open a PR. Let the checks run. If the build check is successful and your description conveys the intent, then we'll probably merge it. | ||
|
||
You can also open an issue if you spot one. | ||
|
||
## Merging right now... | ||
Right now, the evaluation for FOSS Hack is still ongoing. As such, we won't be merging any PR's until August 20, 2024. But feel free to open one, we'll merge once the evaluation finishes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,140 @@ | ||
# portal | ||
The web portal for zitefy | ||
<img src="https://github.com/user-attachments/assets/ab7f7be0-5f8c-4839-9fa8-4e476f7364e9" alt="zitefy" width="250" align="right"> | ||
|
||
# `portal` 🌐 | ||
|
||
> This is the web portal of zitefy, live [here](https://zitefy.com). Built with [solid.js](https://www.solidjs.com/) & typescript. | ||
## Table Of Contents | ||
* [What's this?](#whats-this) | ||
* [Role in the stack](#role-in-the-stack) | ||
* [Code Overview](#code-overview) | ||
* [Setup Guide](#setup-guide) | ||
* [Prerequisites](#prerequisites) | ||
* [Build & Run](#build--run) | ||
|
||
## What's this? | ||
This is the web portal of zitefy. Essentially, the web app you see running on [zitefy.com](https://zitefy.com/). This is written using [solid.js](https://www.solidjs.com/) & typescript. | ||
|
||
### Role in the stack | ||
This portal does the following: | ||
|
||
* allows users to login & register with the api. | ||
* allows users to edit their zitefy profile | ||
* allows users to browse the available templates | ||
* act as a medium to create sites from templates | ||
* serve as a site editor and integrates zitechef | ||
|
||
### Code Overview | ||
This is the code structure for this project. We chose solid.js over traditional stuff like react because of it's brevity and simpler nature. React's virtual DOM seems too complicated and forces us to declare more variables, which would increase the overall bundle size and memory footprint. So, we decided to go with something simple. | ||
|
||
``` | ||
| | ||
|- src/ | ||
| | | ||
| |- api/ # utility functions for communicating with the api | ||
| | | | ||
| | |- anthropic.ts | ||
| | |- auth.ts | ||
| | |- base.ts | ||
| | |- cache.ts | ||
| | |- config.ts | ||
| | |- index.ts | ||
| | |- site.ts | ||
| | |- storage.ts | ||
| | |- template.ts | ||
| | | ||
| |- assets/ | ||
| | | | ||
| | |- # some static assets like images | ||
| | | ||
| |- components/ # universally used components | ||
| | | | ||
| | |- Button.tsx | ||
| | |- DatePicker.tsx | ||
| | |- Header.tsx | ||
| | |- ImageUpload.tsx | ||
| | |- Loader.tsx | ||
| | |- Logo.tsx | ||
| | |- Modal.tsx | ||
| | |- # and a bunch of others | ||
| | | ||
| |- contexts/ # universal state managers | ||
| | | | ||
| | |- AuthContext.tsx # for auth obviously | ||
| | | ||
| |- pages/ # all the different pages | ||
| | | | ||
| | |- 404/ # not found | ||
| | | |- components/ | ||
| | | |- 404.tsx # not working | ||
| | | |- Taken.tsx # /*invalid username route | ||
| | | | ||
| | |- anthropic/ | ||
| | | |- ZiteChef.tsx # set api token page | ||
| | | | ||
| | |- auth/ | ||
| | | |- components/ | ||
| | | |- Login.tsx # /login route | ||
| | | |- SignUp.tsx # /signup route | ||
| | | | ||
| | |- dashboard/ | ||
| | | |- Dashboard.tsx # / route | ||
| | | | ||
| | |- profile/ | ||
| | | |- components/ | ||
| | | |- Profile.tsx # /profile route | ||
| | | | ||
| | |- templates/ | ||
| | | |- components/ | ||
| | | |- Editor.tsx # /editor route | ||
| | | |- Explorer.tsx # /explore route | ||
| | | ||
| |- App.tsx | ||
| |- index.css | ||
| |- index.tsx | ||
| |- types.d.ts | ||
| | ||
|- .gitignore | ||
``` | ||
|
||
## Setup Guide | ||
Follow this setup guide to install and run the project locally. There are no strict platform requirements. | ||
|
||
### Prerequisites | ||
* **bun** | ||
|
||
Install for linux/WSL or macOS by running this command | ||
``` | ||
$ curl -fsSL https://bun.sh/install | bash | ||
``` | ||
For Windows, open a powershell instance & run | ||
``` | ||
powershell -c "irm bun.sh/install.ps1 | iex" | ||
``` | ||
* **Git CLI** | ||
For linux, skip this step. Install by running the executable for your platform available [here](https://git-scm.com/downloads). | ||
### Build & Run | ||
1. Clone this repository | ||
``` | ||
git clone https://github.com/zitefy/portal.git && cd portal/ | ||
``` | ||
2. Install dependencies | ||
``` | ||
bun install | ||
``` | ||
3. Run the dev script | ||
``` | ||
bun dev | ||
``` | ||
## Contributing | ||
Thanks for your interest in contributing to this project. Please refer to the [contributing guide](https://github.com/zitefy/portal/blob/main/CONTRIBUTING.md). |