-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Monique Cheng
committed
Apr 21, 2024
1 parent
575b5dc
commit dbe06a2
Showing
110 changed files
with
15,243 additions
and
0 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,14 @@ | ||
module.exports = { | ||
extends: ["@calblueprint/eslint-config-react"], | ||
rules: { | ||
// Add any custom rules here | ||
// Disable the rule that requires React to be in scope -- we don't need this with React 18 | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: {} | ||
} | ||
} | ||
}; |
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,28 @@ | ||
[//]: # "These comments are meant for your reference. They are invisible and don't need to be deleted!" | ||
|
||
## What's new in this PR | ||
### Description | ||
[//]: # "Required - Describe what's new in this PR in a few lines. A description and bullet points for specifics will suffice." | ||
|
||
### Screenshots | ||
[//]: # "Required for frontend changes, otherwise optional but strongly recommended. Add screenshots of expected behavior - GIFs if you're feeling fancy!" | ||
|
||
## How to review | ||
[//]: # "Required - Describe the order in which to review files and what to expect when testing locally. Is there anything specifically you want feedback on? Should this be reviewed commit by commit, or all at once? What are some user flows to test? What are some edge cases to look out for?" | ||
|
||
## Next steps | ||
[//]: # "Optional - What's NOT in this PR, doesn't work yet, and/or still needs to be done. Note any temporary fixes in this PR that should be cleaned up later." | ||
|
||
## Relevant Links | ||
|
||
### Online sources | ||
[//]: # "Optional - copy links to any tutorials or documentation that was useful to you when working on this PR" | ||
|
||
### Related PRs | ||
[//]: # "Optional - related PRs you're waiting on/ PRs that will conflict, etc; if this is a refactor, feel free to add PRs that previously modified this code" | ||
|
||
|
||
|
||
|
||
[//]: # "This tags the project leader as a default. Feel free to change, or add on anyone who you should be in on the conversation." | ||
🛍 CC: @EthanAuyeung |
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,56 @@ | ||
--- | ||
name: Lint | ||
|
||
############################# | ||
# Start the job on push # | ||
############################# | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
############### | ||
# Set the Job # | ||
############### | ||
jobs: | ||
build: | ||
# Name the Job | ||
name: Run ESLint, Prettier, and TypeScript compiler | ||
# Set the agent to run on | ||
runs-on: ubuntu-latest | ||
|
||
################## | ||
# Load all steps # | ||
################## | ||
steps: | ||
########################## | ||
# Checkout the code base # | ||
########################## | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
# Full git history is needed to get a proper | ||
# list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
################################ | ||
# Install packages # | ||
################################ | ||
- name: Install packages | ||
run: npm ci | ||
################################ | ||
# Lint codebase # | ||
################################ | ||
- name: Run ESLint | ||
run: npx eslint . | ||
################################ | ||
# Check Prettier on codebase # | ||
################################ | ||
- name: Run Prettier | ||
run: npx prettier --check . | ||
################################ | ||
# Check for TypeScript errors # | ||
################################ | ||
- name: Run TypeScript compiler (tsc) | ||
run: npx tsc --noEmit |
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,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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 @@ | ||
18 |
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,11 @@ | ||
.github/ | ||
.vscode/ | ||
README.md | ||
package-lock.json | ||
.eslintrc.js | ||
.next/ | ||
.prettierrc.js | ||
next-env.d.ts | ||
next.config.js | ||
package.json | ||
tsconfig.json |
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,5 @@ | ||
const blueprintPrettier = require("@calblueprint/prettier-config"); | ||
|
||
module.exports = { | ||
...blueprintPrettier, | ||
}; |
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,13 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"eamodio.gitlens" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
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,8 @@ | ||
{ | ||
"typescript.tsdk": "node_modules\\typescript\\lib", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"editor.formatOnSave": true, | ||
"files.autoSave": "onFocusChange" | ||
} |
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,54 @@ | ||
# Shanti Project | ||
|
||
This project is designed and developed by a team of UC Berkeley students through one of [Cal Blueprint](https://calblueprint.org/)'s project teams during the 2022-23 academic year. | ||
|
||
Learn more about [Shanti Project](https://www.shanti.org/) and [Cal Blueprint](https://calblueprint.org/). | ||
|
||
--- | ||
## Getting Started | ||
|
||
Check your installation of npm and node: | ||
|
||
```sh | ||
node -v | ||
npm -v | ||
``` | ||
We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) (for Mac) or [nvm-windows](https://github.com/coreybutler/nvm-windows) (for Windows) to install Node.js and npm. See [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | ||
### Installation | ||
|
||
1. Clone the repo & install dependencies | ||
1. Clone this repo | ||
* using SSH (recommended) | ||
```sh | ||
git clone [email protected]:calblueprint/shanti-project.git | ||
``` | ||
* using HTTPS | ||
```sh | ||
git clone https://github.com/calblueprint/shanti-project.git | ||
``` | ||
2. Enter the cloned directory | ||
```sh | ||
cd shanti-project | ||
``` | ||
3. Install project dependencies. This command installs all packages from [`package.json`](package.json). | ||
```sh | ||
npm install | ||
``` | ||
2. Set up secrets: | ||
TBD | ||
|
||
**Helpful resources** | ||
|
||
* [GitHub: Cloning a Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository#cloning-a-repository) | ||
* [GitHub: Generating SSH keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) | ||
### Development Environment | ||
|
||
- **[VSCode](https://code.visualstudio.com/) (recommended)** | ||
1. Open the `shanti-project` project in VSCode. | ||
2. Install recommended workspace VSCode extensions. You should see a pop-up on the bottom right to "install the recommended extensions for this repository". | ||
### Running the app | ||
1. In the project directory, run: | ||
```shell | ||
npm run dev | ||
``` | ||
2. Open up [http://localhost:3000](http://localhost:3000) in your browser to see the results. |
Binary file not shown.
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,11 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig | ||
|
||
module.exports = { | ||
compiler: { | ||
// Enables the styled-components SWC transform | ||
styledComponents: true | ||
} | ||
} |
Oops, something went wrong.