Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/yale-swe/f23-here
Browse files Browse the repository at this point in the history
  • Loading branch information
phucd5 committed Nov 28, 2023
1 parent ae02602 commit 46c6387
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
55 changes: 51 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Join us in redefining social interaction in the digital age with a fresh perspec
## Table of Contents
1. [MVP Requirement Fullfillment](#mvp-requirement-fullfillment)
2. [Deployment](#deployment)
3. [Adding to the Codebase](#adding-to-the-codebase)
3. [Running Instructions](#running-instructions)
- [Running Frontend](#running-frontend)
- [Running Backend](#running-backend)
4. [Adding to the Codebase](#adding-to-the-codebase)
- [Frontend](#frontend)
- [Adding a New Feature](#adding-a-new-feature)
- [Example: Adding a 'Reaction' Feature](#example-adding-a-reaction-feature)
Expand All @@ -18,10 +21,54 @@ Join us in redefining social interaction in the digital age with a fresh perspec
- [Adding Backend Routes](#adding-backend-routes)
- [Example Route and Controller Implementation](#example-route-and-controller-implementation)
- [Adding Backend Tests](#adding-backend-tests)
4. [Testing](#testing)
5. [Testing](#testing)
- [Backend](#backend-1)
- [Frontend](#frontend-1)

# Running Instructions

## Running Frontend

1. **Clone the Repository:**
- If you haven't already, clone the repository to your local machine using `git clone https://github.com/yale-swe/f23-here`.

2. **Open the Project in Xcode:**
- Navigate to the `app` directory within the cloned repository.
- Open this folder with Xcode.

3. **Select a Simulator or Device:**
- In Xcode, choose a simulator or connect a physical iOS device to run the application on.

4. **Build and Run the Project:**
- Click on the "Play" button or use the shortcut `Cmd + R` to build and run the application.


## Running Backend
1. **Clone the Repository:**
- If you haven't already, clone the repository to your local machine using `git clone https://github.com/yale-swe/f23-here`.

2. **Navigate to the Server Directory:**
- Open a terminal and navigate to the `server` directory within the cloned repository.

3. **Install Dependencies:**
- Run the command `npm install` to install all the necessary dependencies for the backend server.

4. **Environment Variables:**
- Set up the required environment variables. Refer to the example below for the necessary variables.

5. **Start the Server:**
- Run the command `node server.js` to start the backend server.
- The server should now be running and accessible on the specified port.

```env
# .env file example
PORT=6000
MONGO_URL=mongodb+srv://heredemo:swe439here@clusterdemo.mnbogqc.mongodb.net/
API_KEY=qe5YT6jOgiA422_UcdbmVxxG1Z6G48aHV7fSV4TbAPs
```


# MVP Requirement Fullfillment
- [] Message Viewing Capability: Users can view all messages
- [] Message Visitng Capability at Specific Locations: Users can view all messages when they are within a predefined geographical area covered by the app.
Expand Down Expand Up @@ -167,7 +214,7 @@ export const getUserById = async (req, res) => {
- Use `jest.mock()` to replace actual implementations with mock functions that return testable results.

6. **Running Tests:**
- To run your tests, use the command `npm test`.
- To run your tests, use the command `npm test --coverage`.
- Ensure that your new tests pass without interfering with existing tests.

7. **Review and Refactor:**
Expand Down Expand Up @@ -201,7 +248,7 @@ To run our testing script in the backend, execute the following:
```bash
cd server
npm test
npm test --coverage
```
Current Coverge:
Expand Down
3 changes: 1 addition & 2 deletions app/newHere1/newHere/Views/Home/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ struct HomePageView: View {
// Render popups upon state variables being true.

if isShowingPosts {
PostsPopup(isPresented: $isShowingPosts)
.environmentObject(messageState)
PostsPopup(isPresented: $isShowingPosts, messageState: messageState, locationDataManager: locationDataManager)
.frame(width: 300, height: 300)
.background(Color.white.opacity(0.5))
.cornerRadius(12)
Expand Down
2 changes: 1 addition & 1 deletion app/newHere1/newHere/Views/Post/Post.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct PostsPopup: View {
@State var noteMessage: String = ""
@State var isEditing = false

var messageState: MessageState
var messageState: MessageState

let senderName: String = "Username"

Expand Down

0 comments on commit 46c6387

Please sign in to comment.