Skip to content

Commit

Permalink
Merge pull request #55 from dalurness/du/contributing
Browse files Browse the repository at this point in the history
add contributing file
  • Loading branch information
dalurness authored Nov 12, 2024
2 parents 5217aba + 9b40d97 commit 2257c2a
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 53 deletions.
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to Winter Code Fest

Thank you for being here!

The Winter Code Fest is meant to be a fun community project, and you are now a part of it!

Head over to the [GitHub Issues](https://github.com/dalurness/winter-code-fest/issues) to look for something you are interested in working on.

We are guided by the goals below for this project, so if your PR aligns with these goals then there is a good chance it will be accepted! Feel free to open up issues to highlight problems you find or ideas you have for improvements that merit discussion.

#### Project Goals
- Questions are easy and medium difficulty, encouraging creativity and learning
- Participants are encouraged to discuss questions and share their solutions

### Getting Started
Site start up:
1. make sure you have node installed
2. clone the repo
3. run `npm i` from the repo directory to install dependencies
4. run `npm run dev` to start the website locally
5. navigate to [localhost:4321/winter-code-fest](http://localhost:4321/winter-code-fest)
6. If some types aren't available such as from calls to `getCollection` you might have to run `npm run astro sync` manually to get those

### 🚀 Project Structure
In case you can't tell, we are using [Astro](https://astro.build/) for this project.

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── logo.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

### WCF Logical Organization
WCF is made up of one question per day for the month of December. You can find the page structure for a question in `/src/pages/day/[day]/index.astro`. This is where a majority of the work needs to take place.

There are some dynamic parts to the page that you can read the Astro documentation on, but long story short the questions are in `/src/content/days`, the community solutions are in `/src/content/communitySolutions`, the dynamic components that verify answers are in `/src/components/solutions`, and the static resource files for the questions are in `/public/day`.

### 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro sync` | Generate high fidelity types for collections |
| `npm run astro -- --help` | Get help using the Astro CLI |
62 changes: 9 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,17 @@
Welcome to the coolest coding festival of the year!

## Introduction
The Winter Code Fest was created as a way to encourage taking some time to try something new! The questions are (originally 😅) meant to be easy and medium difficulty so that they don't take up too much time. Instead, we encourage you to branch out and be creative while solving the puzzles. Maybe use a programming language you are not familiar with, or try to solve them in a unique way. We are even considering just keeping the same questions every year so that each time we return we try out something new. Some feats to date:
- the first ten questions solved in excel
- one question solved completely in machine code


## Contributing
We would love your help on this project! Whether you want to add a question, put a little more flair to the site styles, or modify a question to come to a more checkable solution, we appreciate the help. We are guided by the goals below for this project, so if your PR aligns with these goals then there is a good chance it will be accepted! Feel free to open up issues to highlight problems you find or ideas you have for improvements.

#### Project Goals
- Questions are easy and medium difficulty, encouraging creativity and learning
- Devs are encouraged to discuss questions and share their solutions

### Getting Started running the project
Site start up:
1. make sure you have node installed
2. clone the repo
3. run `npm i` from the repo directory to install dependencies
4. run `npm run dev` to start the website locally
5. navigate to [localhost:4321/winter-code-fest](http://localhost:4321/winter-code-fest)
6. If some types aren't available such as from calls to `getCollection` you might have to run `npm run astro sync` manually to get those
The Winter Code Fest was created as a way to encourage taking some time to try something new! The questions are meant to be easy and medium difficulty so that **they don't take up too much time** (this is supposed to be a fun exercise, not a chore!).

### 🚀 Project Structure
Instead, we encourage you to **branch out** and **be creative** while solving the puzzles. Maybe use a programming language you are not familiar with, or try to solve the questions in a unique way.

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── logo.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.
Some feats to date:
- the first several questions solved in excel
- one question solved completely in machine code

### 🧞 Commands
## Once You Have Finished A Question
Once you have completed a question, submit your answer with a PR to this repo! The solutions belong in `/src/content/communitySolutions`.**Set the name of the file to your GitHub username**. Include descriptions (look at an example of someone else's submission) along with your code and then we will merge it to start showing on the site.

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro sync` | Generate high fidelity types for collections |
| `npm run astro -- --help` | Get help using the Astro CLI |
## Contributing
We would love your help on this project! Whether you want to add a question, put a little more flair to the site styles, or modify a question to come to a more checkable solution, we appreciate the help. Head over to the [contributing file](/CONTRIBUTING.md).

0 comments on commit 2257c2a

Please sign in to comment.