Samaritan Inn Scheduling App is a web application serving the residents and staff of Samaritan Inn, a nonprofit homeless shelter dedicated to community support. Staff members can create, schedule, edit, and remove announcements to keep everyone informed and organized. Residents can register for life skills classes, book appointments, request curfew extensions, and manage personal schedules through an integrated calendar. The platform leverages Next.js, Prisma, and SQLite to deliver a secure, scalable, and user-friendly experience.
- Features
- Tech Stack
- Getting Started
- Project Structure
- Database Management
- Authentication
- Deployment
- Contributing
- License
- Residents
- View announcements posted by staff.
- Schedule life skills classes to enhance their personal development.
- Request curfew extensions.
- Manage their schedules using a personal calendar to organize appointments and busy times.
- Staff
- Create, post, and schedule announcements for residents.
- Manage life skills classes, including scheduling and capacity limits.
- Staff can create, edit, and delete announcements.
- Announcements include timestamps and author details.
- Residents can request curfew extensions through the platform.
- Secure login and signup using NextAuth.js.
- Role-based access for staff and residents.
- Optimized for both desktop and mobile devices.
- Frontend: Next.js (React Framework)
- Backend: Node.js with Next.js API routes
- Database: SQLite with Prisma ORM
- Authentication: NextAuth.js
- Styling: Tailwind CSS
- Node.js (v18 or higher)
- npm or Yarn
- SQLite (comes pre-installed with Prisma)
- Clone the repository:
git clone https://github.com/your-username/samaritan-inn.git cd samaritan-inn
- Install dependencies:
npm install
- (create
.env
file and add the required information) npx prisma migrate dev
npx prisma generate
- Configure environment variables:
Create a
.env
file in the root directory with:DATABASE_URL="file:./dev.db" NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key-for-jwt-encryption"
- Start the development server:
npm run dev # or yarn dev
- Open your browser and navigate to
http://localhost:3000
.
├── .env
├── .gitignore
├── eslint.config.mjs
├── next-env.d.ts
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── README.md
├── tailwind.config.ts
├── tsconfig.json
├── prisma
│ ├── schema.prisma
│ ├── dev.db
│ └── migrations
├── public
│ ├── file.svg
│ ├── globe.svg
│ ├── next.svg
│ ├── vercel.svg
│ └── window.svg
├── src
│ ├── app
│ │ ├── favicon.ico
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── announcements
│ │ ├── api
│ │ │ ├── announcements
│ │ │ ├── auth
│ │ │ ├── login
│ │ │ └── register
│ │ ├── auth-status
│ │ ├── caseworker
│ │ ├── curfew
│ │ ├── dashboard
│ │ ├── homepage
│ │ ├── login
│ │ ├── signup
│ │ ├── unauthorized
│ │ └── Resources
│ ├── components
│ │ ├── Navigation.tsx
│ │ └── providers
│ │ └── SessionProvider.tsx
│ ├── lib
│ │ ├── auth.ts
│ │ └── prisma.ts
│ └── types
│ └── next-auth.d.ts
└── .next
├── app-build-manifest.json
├── build-manifest.json
├── cache
├── server
└── static
### Scripts
- `npm run dev` – Start the development server
- `npm run build` – Build for production
- `npm start` – Start the production server
- `npm run lint` – Run linter
---
## Database Management
- **Prisma Studio:**
```bash
npx prisma studio
- Migrations:
npx prisma migrate dev --name <migration_name>
This project uses NextAuth.js for authentication with two roles:
- Staff (Admin): Can post and manage announcements.
- Resident: Can view announcements and request curfew extensions.
- Build the application:
npm run build
- Start the production server:
npm start
- Allow admin to add attachements to announcements and events
- Change curfew to more of a form and then sends admin response to user in form of email or notification
- Change scheduling to Salesforce rather than Calendly
- User request form to fulfill order in inflow.