Skip to content

UTDallasEPICS/the-samaritan-inn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Samaritan Inn Scheduling App

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.


Table of Contents


Features

Role-Based Access Control

  • 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.

Announcements Management

  • Staff can create, edit, and delete announcements.
  • Announcements include timestamps and author details.

Curfew Extension Requests

  • Residents can request curfew extensions through the platform.

Authentication

  • Secure login and signup using NextAuth.js.
  • Role-based access for staff and residents.

Responsive Design

  • Optimized for both desktop and mobile devices.

Tech Stack

  • Frontend: Next.js (React Framework)
  • Backend: Node.js with Next.js API routes
  • Database: SQLite with Prisma ORM
  • Authentication: NextAuth.js
  • Styling: Tailwind CSS

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or Yarn
  • SQLite (comes pre-installed with Prisma)

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/samaritan-inn.git
    cd samaritan-inn
  2. Install dependencies:
    • npm install
    • (create .env file and add the required information)
    • npx prisma migrate dev
    • npx prisma generate
  3. 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"
  4. Start the development server:
    npm run dev
    # or
    yarn dev
  5. Open your browser and navigate to http://localhost:3000.

Project Structure

├── .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>

Authentication

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.

Deployment

  1. Build the application:
    npm run build
  2. Start the production server:
    npm start

Future requirements:

  1. Allow admin to add attachements to announcements and events
  2. Change curfew to more of a form and then sends admin response to user in form of email or notification
  3. Change scheduling to Salesforce rather than Calendly
  4. User request form to fulfill order in inflow.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5