https://github.com/aeberdinelli/product-engineer-challenge
Don't take a look at the commits list, I do use atomic commits. I had to re-push resetting the git repo as `infra` was generated by CDK within its own git and codebase first 🤦🏼♂️.
https://github.com/aeberdinelli/product-engineer-challenge
Last synced: 10 months ago
JSON representation
Don't take a look at the commits list, I do use atomic commits. I had to re-push resetting the git repo as `infra` was generated by CDK within its own git and codebase first 🤦🏼♂️.
- Host: GitHub
- URL: https://github.com/aeberdinelli/product-engineer-challenge
- Owner: aeberdinelli
- Created: 2025-08-08T05:36:36.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-08-11T07:19:07.000Z (10 months ago)
- Last Synced: 2025-08-11T07:21:51.440Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 559 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Psychiatrist Scheduler
A tiny, cheap-to-run MVP where users can find psychiatrists, view weekly availability (online / in-person), and request appointments. Admins can approve/reject requests.
## Quickstart frontend
### 📋 Requirements
- **Node 20 LTS**
- **AWS CLI**
### 🔧 Configure API base URL
Create `web/.env`:
```env
VITE_API_BASE=https://
```
> This is the CDK output `ApiEndpoint` (no trailing slash).
### ▶️ Install & run
```bash
cd web
npm install
npm run dev
```
Open http://localhost:5173
## Deploy backend (AWS)
### 📋 Requirements
- AWS account with permissions to deploy
- **AWS CLI** configured:
```bash
aws configure
```
- **CDK v2** installed:
```bash
npm i -g aws-cdk
```
### 🚀 Bootstrap the environment (first time per account/region)
```bash
cd infra
npm install
cdk bootstrap
```
### 🚢 Deploy
```bash
cd infra
cdk deploy
```
After deploy:
- Copy the `ApiEndpoint` from the CDK outputs into `web/.env` as `VITE_API_BASE`.
- If your browser shows CORS issues, we already enable permissive CORS in the stack. Redeploy if you changed it.
## 📂 Project Structure
```
psychiatrist-scheduler/
├── api/ # Lambda handlers (TypeScript)
│ └── ...
│
├── infra/ # AWS CDK app (TypeScript)
│ ├── bin/
│ │ └── psychiatrist-scheduler.ts # CDK entrypoint
│ ├── lib/
│ │ └── infra.ts # Stack: DynamoDB, GSIs, Lambdas, HTTP API, CORS
│ └── package.json
│
├── web/ # React + Vite frontend (TypeScript)
│ ├── src/
│ │ ├── api.ts # Lightweight API client
│ │ ├── App.tsx # Routes + AppBar
│ │ └── pages/
│ │ ├── PsychiatristsPage.tsx # Search + weekly availability + request
│ │ └── AdminPage.tsx # Approve/Reject + list all appointments
│ ├── index.html, main.tsx, ...
│ └── package.json
```
## 🛠 Tech Used
- **Frontend**
- [React](https://react.dev/) + [Vite](https://vitejs.dev/) + TypeScript
- [MUI](https://mui.com/) for UI components
- [Luxon](https://moment.github.io/luxon/) for date/time handling
- **Backend**
- AWS Lambda (Node.js 20)
- API Gateway HTTP API
- DynamoDB (single-table design + GSIs)
- [schemy-ts](https://github.com/aeberdinelli/schemy) for schema validation
- **Infra**
- [AWS CDK v2](https://docs.aws.amazon.com/cdk/v2/guide/home.html) for IaC
- Permissive CORS for quick prototyping