diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f143c66 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e162cf7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.jpg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/Dockerfile b/Dockerfile index c8d2a32..1da9527 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,54 @@ -# Build stage for client -FROM node:14 AS client-build -WORKDIR /app/client -COPY client/package*.json ./ -RUN npm install -COPY client/ ./ -RUN npm run build -- --mode production +# Build stage +FROM node:14 AS build -# Build stage for server -FROM node:14 AS server-build -WORKDIR /app/server -COPY server/package*.json ./ -RUN npm install -COPY server/ ./ -RUN npm run build +WORKDIR /app + +# Copy package.json and package-lock.json +COPY .env ./.env +COPY package*.json ./ +COPY client/package*.json ./client/ +COPY server/package*.json ./server/ + +# Install dependencies +RUN cd client && npm cache clean --force && rm -rf node_modules && npm install +RUN cd server && npm install + +# Copy source code +COPY . . + +# Install nodemailer and dotenv +RUN npm install nodemailer dotenv date-fns react-icons + +# Build client +RUN cd client && npm run build + +# Install all dependencies including devDependencies +RUN cd server && npm install + +# Build server +RUN cd server && npm run build + +# Remove devDependencies +RUN cd server && npm prune --production # Production stage FROM node:14-alpine + WORKDIR /app -COPY --from=client-build /app/client/build ./client/build -COPY --from=server-build /app/server/dist ./server/dist -COPY --from=server-build /app/server/package*.json ./server/ + +# Copy built assets from build stage +COPY --from=build /app/client/build ./client/build +COPY --from=build /app/server ./server +COPY --from=build /app/.env ./.env + +# Set working directory to server WORKDIR /app/server + +# Install production dependencies RUN npm install --only=production + +# Expose port EXPOSE 5000 -CMD ["node", "dist/index.js"] \ No newline at end of file + +# Start the server +CMD ["npm", "start"] \ No newline at end of file diff --git a/README.md b/README.md index cf34a51..ecfb41d 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,38 @@ # Missoula Council of the Deaf, Inc. Website -This repository contains the source code for the Missoula Council of the Deaf, Inc. (MCDi) website. The project is built using a MERN stack (MongoDB, Express, React, Node.js) with TypeScript and is containerized using Docker. +This repository contains the source code for the Missoula Council of the Deaf, Inc. (MCDi) website. The project is built using a modern web stack with React for the frontend and Express.js for the backend, both implemented in TypeScript. The application is containerized using Docker for easy deployment and scalability. ## Features -- Responsive design -- Animated UI components using Framer Motion -- Docker containerization for easy deployment -- Express.js backend serving static React files +- Responsive design using Tailwind CSS +- Dynamic UI components with React and Framer Motion for animations +- TypeScript for enhanced type safety and developer experience +- Express.js backend serving static React files and handling API requests +- Docker containerization for consistent development and deployment environments +- Calendar functionality with upcoming events display +- About Us section with board member information +- Bylaws and Minutes sections for organizational transparency +- Sponsor showcase +- Contact form in the footer -## Project Structure +## Key Components -The project is organized into client and server directories: +### Client-side -- `client/`: React frontend application -- `server/`: Express.js backend application -- `Dockerfile`: Multi-stage build for both client and server -- `docker-compose.yml`: Docker Compose configuration for running the application +- `App.tsx`: Main application component with routing setup +- `Header.tsx`: Navigation component +- `Home.tsx`: Landing page with featured content +- `Calendar.tsx`: Interactive calendar with event display +- `Meet-Board.tsx`: Board member profiles +- `Bylaws.tsx`: Organization bylaws display +- `Minutes.tsx`: Meeting minutes display +- `Sponsors.tsx`: Sponsor information and logos +- `Footer.tsx`: Footer component with contact form + +### Server-side + +- `index.ts`: Express.js server setup +- `sendEmail.ts`: Email sending functionality for contact form ## Getting Started @@ -24,5 +40,42 @@ To run this project locally: 1. Clone the repository 2. Install Docker and Docker Compose -3. Run `docker-compose up --build` in the project root directory -4. Access the website at `http://localhost:5000` +3. Create a `.env` file in the root directory with necessary environment variables +4. Run `docker-compose up --build` in the project root directory +5. Access the website at `http://localhost:5000` + +## Development + +- Client-side development: `cd client && npm start` +- Server-side development: `cd server && npm run dev` +- Build client: `cd client && npm run build` +- Build server: `cd server && npm run build` + +## Deployment + +The project is set up for easy deployment using Docker. The `Dockerfile` includes a multi-stage build process for both client and server, optimizing the final image size. + +## Deployment with Docker Compose + +This project is containerized using Docker for easy deployment. Follow these steps to deploy the MCDi website: + +1. Ensure Docker and Docker Compose are installed on your system. + +2. Navigate to the project root directory containing the docker-compose.yml file. + +3. Create a .env file in the root directory with the necessary environment variables: +NODE_ENV=production +GOOGLE_EMAIL=your-email@gmail.com GOOGLE_APP_PASSWORD=your-app-password + +4. Build and start the containers: +docker-compose up --build + +5. Access the application at http://localhost:4000 + +6. To stop the containers: +docker-compose down + +7. Use Docker Compose in detached mode: +docker-compose up -d + +This setup allows for easy deployment and management of the MCDi website container, with the ability to scale and update as needed using Docker Compose. diff --git a/Scheduled Events (Responses) - Form Responses 1.csv b/Scheduled Events (Responses) - Form Responses 1.csv new file mode 100644 index 0000000..cac8eca --- /dev/null +++ b/Scheduled Events (Responses) - Form Responses 1.csv @@ -0,0 +1,2 @@ +Timestamp,Event Date,End Date (if multi-day event),Event Type,Custom Other Event Type (if applicable),Event Name,Location,Start Time,End Time,Name of Point of Contact,Notes,Email address of Point of Contact +10/10/2024 20:16:30,10/10/2024,,Community Outreach,,DeafBlind Retreat,Missoula Coffee Cafe,10:00:00 AM,12:00:00 PM,Chris Haulmark,Meet and learn from the DeafBlind about accessibility issues around Missoula.,chris@sigd.net \ No newline at end of file diff --git a/client/.DS_Store b/client/.DS_Store new file mode 100644 index 0000000..f128067 Binary files /dev/null and b/client/.DS_Store differ diff --git a/client/package.json b/client/package.json index d25d0d5..a191fad 100644 --- a/client/package.json +++ b/client/package.json @@ -1,44 +1,53 @@ { - "name": "mcdi-website-client", - "version": "1.0.0", - "private": true, - "homepage": ".", - "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-router-dom": "^6.10.0", - "styled-components": "^5.3.9", - "framer-motion": "^10.12.4" - }, - "devDependencies": { - "@types/react": "^18.0.37", - "@types/react-dom": "^18.0.11", - "@types/styled-components": "^5.1.26", - "typescript": "^5.0.4", - "react-scripts": "5.0.1" - }, - "scripts": { - "start": "react-scripts start", - "build": "GENERATE_SOURCEMAP=false react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } - } \ No newline at end of file + "name": "mcdi-website-client", + "version": "1.0.0", + "private": true, + "dependencies": { + "@types/node": "^20.8.9", + "@types/react": "^18.2.33", + "@types/react-dom": "^18.2.14", + "@types/react-router-dom": "^5.3.3", + "framer-motion": "^10.16.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.17.0", + "react-scripts": "5.0.1", + "styled-components": "^6.1.0", + "typescript": "^5.2.2" + }, + "scripts": { + "build:css": "postcss src/index.css -o src/tailwind.css", + "start": "react-scripts start", + "build": "npm run build:css && react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "devDependencies": { + "postcss-cli": "^8.3.1", + "@types/styled-components": "^5.1.29", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.31", + "tailwindcss": "^3.3.5", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "@babel/preset-react": "^7.22.15", + "@babel/plugin-proposal-private-property-in-object": "^7.21.11" + }} \ No newline at end of file diff --git a/client/postcss.config.js b/client/postcss.config.js new file mode 100644 index 0000000..674ffa6 --- /dev/null +++ b/client/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: [ + require('tailwindcss'), + require('autoprefixer'), + ] +} diff --git a/client/public/.DS_Store b/client/public/.DS_Store new file mode 100644 index 0000000..d6015ba Binary files /dev/null and b/client/public/.DS_Store differ diff --git a/client/public/MCD-Inc._AOI_Bylaws.pdf b/client/public/MCD-Inc._AOI_Bylaws.pdf index b43bf7d..42e621b 100644 Binary files a/client/public/MCD-Inc._AOI_Bylaws.pdf and b/client/public/MCD-Inc._AOI_Bylaws.pdf differ diff --git a/client/public/facebook-logo.png b/client/public/facebook-logo.png new file mode 100644 index 0000000..83d36d1 --- /dev/null +++ b/client/public/facebook-logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2adfd474d91fd20c51084309ed000c1ae6cc7f5f70af14d375930f5a71301308 +size 54771 diff --git a/client/public/headshots/female.png b/client/public/headshots/female.png new file mode 100644 index 0000000..d641ceb --- /dev/null +++ b/client/public/headshots/female.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47c65b7dcc296d6db7e9b500b9aeb3fd6bd2b3d80e6dcb5e00b6383d8eec0a7c +size 22027 diff --git a/client/public/headshots/male.png b/client/public/headshots/male.png new file mode 100644 index 0000000..d8e0da9 --- /dev/null +++ b/client/public/headshots/male.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d13c582ed01aeabdceff0203d09ffc4aa589f6092173edec9770c580c82dad28 +size 16293 diff --git a/client/public/index.html b/client/public/index.html index 55f7ccb..310e416 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -16,5 +16,6 @@
+