Skip to content

Commit

Permalink
add onboarding form, refactor dev doc flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkang-0 committed May 17, 2024
1 parent dffca41 commit b6cb0f8
Show file tree
Hide file tree
Showing 18 changed files with 380 additions and 40 deletions.
25 changes: 12 additions & 13 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@ const adminSidebar = ['/admin/', '/admin/retool', '/admin/legal-server'];
const devSidebar = [
'/dev/',
{
text: 'Client Application',
text: 'Application',
link: '/dev/app/',
collapsible: true,
sidebarDepth: 2,
children: [
'/dev/client/auth',
'/dev/client/onboarding',
'/dev/client/listings',
'/dev/client/settings',
'/dev/app/auth',
'/dev/app/onboarding',
'/dev/app/listings',
'/dev/app/settings',
],
},
{
text: 'Backend',
collapsible: true,
sidebarDepth: 2,
children: ['/dev/backend/database.md', '/dev/backend/retool.md'],
},
'/dev/retool',
'/dev/deployment',
];

const designSidebar = ['/design/'];

export default defineUserConfig({
title: 'Immigration Justice Project',
description:
Expand All @@ -50,9 +48,10 @@ export default defineUserConfig({
sidebar: {
'/admin': adminSidebar,
'/dev': devSidebar,
'/design': designSidebar,
},
logo: '/ijp_logo_black.png',
logoDark: '/ijp_logo_white.png',
logo: '/images/ijp_logo_black.png',
logoDark: '/images/ijp_logo_white.png',
}),
plugins: [searchPlugin(), backToTopPlugin()],
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added docs/.vuepress/public/images/role-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion docs/design/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Design
# Design

## Navigating Figma

## Page Overview

## Design System
43 changes: 38 additions & 5 deletions docs/dev/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
---
next: /dev/client/auth
---

# Project Overview

## Project Setup
The project can be split into two parts:
- The [main user portal application](/dev/app/), built using Next.js
- The [admin dashboard](/dev/retool), built using Retool

## Navigating this Site

For more details about each part, check out their respective guides:
- [Application](/dev/app/)
- [Admin Dashboard](/dev/retool)

For specifics on deployment, check out the [deployment guide](/dev/deployment).

## Known Issues

## Feature Wishlist

## Information Collected

For all volunteers, we collect the following information:
- Email address
- Volunteering roles (attorney, interpreter, legal fellow)
- First name
- Last name
- Country of residence
- State/province of residence
- City of residence
- Languages that the user can speak or understand
- Languages for which the user can read or write
- Phone number
- Time availability per month
- Earliest date of availability
- Special notes on unavailability (which is optional)
- Listings the user submitted an interest form for

Additionally, we collect the following for attorneys:
- One state the user is barred in
- The bar number the user has from that state
- Whether or not the user is registered by the Executive Office of Immigration Review

Separate from attorneys, we collect the following additional data for legal fellows:
- Expected date to be barred
- Whether or not the user is registered by the Executive Office of Immigration Review
70 changes: 70 additions & 0 deletions docs/dev/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
next: /dev/app/auth
---

# Application

The user portal application is built using Next.js 13 as the main framework, which itself adopts React for frontend.

For the frontend, we employed [styled-components](https://styled-components.com/) as our styling library of choice, along with other React libraries abstract away more complicated components like a [select dropdown](https://react-select.com/home).

For the backend, we used [Supabase](https://supabase.com/) to store our data and manage authentication, which syncs to live cases stored in [Legal Server](https://www.legalserver.org/) to get all current active cases in need of attorney and/or interpreter volunteers.

## Project Setup

1. Pre-requisites

You should have [npm](https://www.npmjs.com/) (Node Package Manager) and [Node](https://nodejs.org/en) (version 18 or higher) installed.

2. Clone repo

Clone the [Repo](https://github.com/calblueprint/immigration-justice-project/) on GitHub using `git clone`:
```bash:no-line-numbers
git clone https://github.com/calblueprint/immigration-justice-project/
```
Then install dependencies:
```bash:no-line-numbers
npm install
```
3. Add environment keys
In the root directory, add the file `.env.local` and add the keys:
- `NEXT_PUBLIC_SUPABASE_URL`: The project URL of the Supabase project
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`: The anonymous key of the Supabase project
Both of these values can be found in project settings, in the API tab.
## Development Lifecycle
Feel free to skip this section if you already have experience with any of the following.
### Creating Pull Requests (PRs)
To keep the working commit history clean, we create branches for each feature and add a PR to merge that feature into main once we're finished. Importantly, we use squash and merge, which compresses all changes made in that feature branch into one commit and adds it onto the main branch.
The pull request template can be found in `.github/pull_request_template.md`.
### GitHub Actions
Every time a push is made to the repo or when a PR is created, a GitHub action will trigger to run ESLint, Prettier, and the Typescript compiler to ensure the code can be safely merged into the main branch.
The description for the action can be found in `.github/workflows/lint.yml`.
### Node Scripts
There is a variety of helpful scripts located in `package.json`, each of which can be executed on the terminal by using the command `npm run [command name]`.
Here is a list of all the commands:
- `dev`: runs the application locally for development
- `build`: builds the application for deployment
- `start`: runs the application locally in deployment mode
- `lint:check`: runs ESLint to check for code quality
- `lint:fix`: automatically fixes lint issues
- `prettier:check`: runs Prettier to check for code cleanliness
- `prettier:fix`: automatically fixes Prettier issues
- `tsc`: runs Typescript compiler to check for compiler errors
## Resources
2 changes: 1 addition & 1 deletion docs/dev/client/auth.md → docs/dev/app/auth.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
prev: /dev/
prev: /dev/app/
---

# Authentication
File renamed without changes.
Loading

0 comments on commit b6cb0f8

Please sign in to comment.