Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/script/STEP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
1
75 changes: 75 additions & 0 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Autograding Tests
'on':
- workflow_dispatch
- repository_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Step 1 Add Headers
id: step-1-add-headers
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 1 Add Headers
setup-command: sleep 20
command: "[ $(cat .github/script/STEP) -ge 1 ] || [ $(cat .github/script/STEP)
= X ]"
timeout: 10
max-score: 1
- name: Step 2 Add an image
id: step-2-add-an-image
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 2 Add an image
setup-command: sleep 20
command: "[ $(cat .github/script/STEP) -ge 2 ] || [ $(cat .github/script/STEP)
= X ]"
timeout: 10
max-score: 1
- name: Step 3 Add a code example
id: step-3-add-a-code-example
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 3 Add a code example
setup-command: sleep 20
command: "[ $(cat .github/script/STEP) -ge 3 ] || [ $(cat .github/script/STEP)
= X ]"
timeout: 10
max-score: 1
- name: Step 4 Make a task list
id: step-4-make-a-task-list
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 4 Make a task list
setup-command: sleep 20
command: "[ $(cat .github/script/STEP) -ge 4 ] || [ $(cat .github/script/STEP)
= X ]"
timeout: 10
max-score: 1
- name: Step 5 Merge your pull request
id: step-5-merge-your-pull-request
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Step 5 Merge your pull request
setup-command: sleep 20
command: "[ $(cat .github/script/STEP) -ge 5 ] || [ $(cat .github/script/STEP)
= X ]"
timeout: 10
max-score: 1
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
STEP-1-ADD-HEADERS_RESULTS: "${{steps.step-1-add-headers.outputs.result}}"
STEP-2-ADD-AN-IMAGE_RESULTS: "${{steps.step-2-add-an-image.outputs.result}}"
STEP-3-ADD-A-CODE-EXAMPLE_RESULTS: "${{steps.step-3-add-a-code-example.outputs.result}}"
STEP-4-MAKE-A-TASK-LIST_RESULTS: "${{steps.step-4-make-a-task-list.outputs.result}}"
STEP-5-MERGE-YOUR-PULL-REQUEST_RESULTS: "${{steps.step-5-merge-your-pull-request.outputs.result}}"
with:
runners: step-1-add-headers,step-2-add-an-image,step-3-add-a-code-example,step-4-make-a-task-list,step-5-merge-your-pull-request
25 changes: 25 additions & 0 deletions hospital-management-system/Dockerfile.backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Dockerfile.backend
# Using a Node.js image as a base
FROM node:18-alpine

# Set the working directory
WORKDIR /app/backend

# Copy package.json and package-lock.json (or yarn.lock)
# Ensure these are copied from the backend subdirectory of the context
COPY backend/package.json ./
COPY backend/package-lock.json ./

# Install dependencies
RUN npm install

# Copy the rest of the backend application code
# Ensure these are copied from the backend subdirectory of the context
COPY backend/ ./

# Expose the port the app runs on (e.g., 5000)
EXPOSE 5000

# Command to run the application (e.g., node src/server.js)
# Make sure your package.json has a "start" script or adjust accordingly
CMD [ "npm", "start" ]
29 changes: 29 additions & 0 deletions hospital-management-system/Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dockerfile.frontend
# Using a Node.js image as a base
FROM node:18-alpine AS build

# Set the working directory
WORKDIR /app/frontend

# Copy package.json and package-lock.json (or yarn.lock)
# Ensure these are copied from the frontend subdirectory of the context
COPY frontend/package.json ./
COPY frontend/package-lock.json ./

# Install dependencies
RUN npm install

# Copy the rest of the frontend application code
# Ensure these are copied from the frontend subdirectory of the context
COPY frontend/ ./

# Build the React application
# Make sure your package.json has a "build" script (e.g., "vite build")
RUN npm run build

# Serve stage
FROM nginx:stable-alpine
# Copy the build output from the build stage to Nginx's web server directory
COPY --from=build /app/frontend/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
25 changes: 25 additions & 0 deletions hospital-management-system/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Hospital Management System

This project is a comprehensive Hospital Management System designed to streamline hospital operations, manage patient data, and facilitate communication between different departments.

**Features (Planned):**
* Patient Registration and Management
* Appointment Scheduling
* Doctor and Staff Management
* Billing and Invoice Generation
* Medical Records Management
* Inventory Management

**Tech Stack:**
* **Frontend:** React, Vite, Tailwind CSS
* **Backend:** Node.js, Express.js
* **Database:** MongoDB (planned)
* **Containerization:** Docker

**Project Structure:**
* `/frontend`: Contains the React frontend application.
* `/backend`: Contains the Node.js/Express backend API.
* `/database`: Will contain database-related scripts, migrations, and seeds.
* `Dockerfile.frontend`: Dockerfile for building the frontend application.
* `Dockerfile.backend`: Dockerfile for building the backend application.
* `docker-compose.yml`: Docker Compose file for orchestrating the services.
5 changes: 5 additions & 0 deletions hospital-management-system/backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/hospital_management_dev
JWT_SECRET=YOUR_VERY_SECRET_KEY_HERE_REPLACE_IT_IN_DOT_ENV_FILE
JWT_EXPIRES_IN=7d
2 changes: 2 additions & 0 deletions hospital-management-system/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.env
Loading