Skip to content

Myesha new #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 131 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
9ce6b44
updated readme file
fzinnah17 Nov 2, 2023
3e177ce
updated the folder with wireframes and milestones
fzinnah17 Nov 2, 2023
8751518
Created database tables
fzinnah17 Nov 2, 2023
7673e94
CRUD features in the controllers folder added
fzinnah17 Nov 2, 2023
2f750b7
created the files for controller and routes folders
fzinnah17 Nov 2, 2023
7fe80d3
services API files added to make connection between frontend and backend
fzinnah17 Nov 2, 2023
048a309
Home page and post page added
fzinnah17 Nov 2, 2023
6719544
Added navigation template
fzinnah17 Nov 2, 2023
95721c0
Post and Comment template added
fzinnah17 Nov 2, 2023
d353fb9
ResourceItem template added
fzinnah17 Nov 2, 2023
162d5fa
DiscussionBoard template added
fzinnah17 Nov 2, 2023
469ad23
ResourceList template added
fzinnah17 Nov 2, 2023
1b1ffad
CreatePost template added
fzinnah17 Nov 2, 2023
d8c2fe3
CreateResource template added
fzinnah17 Nov 2, 2023
f93f3fc
connected frontend with backend
fzinnah17 Nov 2, 2023
eb0d196
Created Home Page
Myesha-Mahazabeen Nov 3, 2023
19f7b51
updated the home css file location
fzinnah17 Nov 3, 2023
868d05e
Created CreatePost page for users
Myesha-Mahazabeen Nov 3, 2023
6bad823
Update milestone3.md with partial milestone checklist
fzinnah17 Nov 4, 2023
433212a
Update milestone3.md with the reflection answers
fzinnah17 Nov 4, 2023
61f91d4
Update milestone3.md
fzinnah17 Nov 4, 2023
86753e0
server backend update
fzinnah17 Nov 4, 2023
fd6a5ee
Merge remote-tracking branch 'origin/main'
fzinnah17 Nov 4, 2023
c5f9b4c
Add files via upload
fzinnah17 Nov 4, 2023
3cd9292
GIFs updated in the folder milestone 3
fzinnah17 Nov 4, 2023
6c0669f
Update README.md with the completed features
fzinnah17 Nov 4, 2023
a089f82
Update entity_relationship_diagram.md with ERD
fzinnah17 Nov 4, 2023
10d9f5b
Update milestone3.md with all the completed instructions
fzinnah17 Nov 4, 2023
bc85fd2
Update README.md
fzinnah17 Nov 4, 2023
b05d183
Created SignUp page
Myesha-Mahazabeen Nov 4, 2023
47a827c
Created Login Page
Myesha-Mahazabeen Nov 4, 2023
1211446
Merge remote-tracking branch 'origin/Myesha'
fzinnah17 Nov 4, 2023
58cf880
Merge remote-tracking branch 'origin/main' into Myesha
Myesha-Mahazabeen Nov 4, 2023
02fefef
post changes
fzinnah17 Nov 5, 2023
112710c
retrieve code from 'myesha's branch
fzinnah17 Nov 5, 2023
75e0aa2
Implented Create, Edit & Delete Posts
Myesha-Mahazabeen Nov 6, 2023
6f275ec
Update milestone4.md
Myesha-Mahazabeen Nov 10, 2023
ae4fb18
Add files via upload
Myesha-Mahazabeen Nov 10, 2023
a73a2f2
Delete GIFs/Untitled design.gif
Myesha-Mahazabeen Nov 10, 2023
fbdc148
Add files via upload
Myesha-Mahazabeen Nov 10, 2023
41fb40a
Update README.md
Myesha-Mahazabeen Nov 10, 2023
7bfe3e7
Update README.md
Myesha-Mahazabeen Nov 10, 2023
3a010e5
Add files via upload
Myesha-Mahazabeen Nov 10, 2023
6bf4664
Update README.md
Myesha-Mahazabeen Nov 10, 2023
11294f1
Update README.md
Myesha-Mahazabeen Nov 10, 2023
dea661c
Update README.md
Myesha-Mahazabeen Nov 10, 2023
51ef037
Update milestone4.md
Myesha-Mahazabeen Nov 10, 2023
9c19850
Delete GIFs/CRUD_Backend.gif
Myesha-Mahazabeen Nov 11, 2023
71de60d
Add files via upload
Myesha-Mahazabeen Nov 11, 2023
931b96f
Update README.md
Myesha-Mahazabeen Nov 11, 2023
c5b87c6
Update README.md
Myesha-Mahazabeen Nov 11, 2023
201883d
Login successful with github
fzinnah17 Nov 11, 2023
9abf94f
Created ResourceList page
Myesha-Mahazabeen Nov 11, 2023
46af15b
logout button for users
fzinnah17 Nov 11, 2023
9f95e2d
Setting Up API Endpoints
fzinnah17 Nov 11, 2023
270dc5e
Update Routes in Express for getting a single post
fzinnah17 Nov 11, 2023
9f5a370
Create a New Component for Viewing a Single Post
fzinnah17 Nov 11, 2023
3ac68bd
Update App.js to Include the New Route of single post
fzinnah17 Nov 11, 2023
d0fd225
updated
Myesha-Mahazabeen Nov 11, 2023
1cdc43e
Created AboutUs page
Myesha-Mahazabeen Nov 11, 2023
8b72603
authorized user access only
fzinnah17 Nov 11, 2023
7d7c507
updated the Post component to include links for editing and deleting …
fzinnah17 Nov 11, 2023
6a94090
Discussion Board to Display Posts
fzinnah17 Nov 11, 2023
849a41e
Add service functions for update and delete operations
fzinnah17 Nov 11, 2023
8e3be67
Added the updatePost and deletePost functions for the controller func…
fzinnah17 Nov 11, 2023
7ad67e0
Update PostRoutes.js with patch and delete
fzinnah17 Nov 11, 2023
85b272f
edit and delete function
fzinnah17 Nov 11, 2023
159917c
protected route for the github users
fzinnah17 Nov 11, 2023
074bd9f
updated
Myesha-Mahazabeen Nov 11, 2023
774c1c3
Merge remote-tracking branch 'origin/Myesha'
fzinnah17 Nov 11, 2023
8257fa0
post controller id
fzinnah17 Nov 11, 2023
721b088
Merge remote-tracking branch 'origin/main' into Myesha
Myesha-Mahazabeen Nov 12, 2023
cc60ef7
updated
Myesha-Mahazabeen Nov 12, 2023
e11f4c9
added package
fzinnah17 Nov 12, 2023
c01d2a7
Updated
Myesha-Mahazabeen Nov 12, 2023
49a3cad
Merge remote-tracking branch 'origin/Myesha'
fzinnah17 Nov 12, 2023
7c6503c
Update README.md with updated features
fzinnah17 Nov 12, 2023
08d507c
Added the discussion board in navbar
fzinnah17 Nov 14, 2023
2808431
create post button in the discussion board
fzinnah17 Nov 14, 2023
90e1880
clicking the posts takes users to /posts/postbyId
fzinnah17 Nov 14, 2023
4342fe1
Update README.md with the discussion board postsId
fzinnah17 Nov 14, 2023
b157721
Backend Dynamic Routing and External Resource Sharing
fzinnah17 Nov 16, 2023
b14bb31
Event page with filter, bookmark and share option
Myesha-Mahazabeen Nov 16, 2023
46ff628
Update README.md with the updated features
fzinnah17 Nov 17, 2023
05226fd
events is protected route
fzinnah17 Nov 17, 2023
98f821a
Merge remote-tracking branch 'origin/Myesha_New'
fzinnah17 Nov 17, 2023
4aaf8ee
pressing the logo redirects to the homepage
fzinnah17 Nov 17, 2023
a14fca5
shows username after logging in
fzinnah17 Nov 17, 2023
c9566b0
railway deployment
fzinnah17 Nov 17, 2023
83dc168
frontend connected for railway deployment
fzinnah17 Nov 17, 2023
df6897a
server/public folder
fzinnah17 Nov 17, 2023
cca789e
removed hardcoded API_URL in the index.html file
fzinnah17 Nov 17, 2023
26d4cee
catch-all route in server.js
fzinnah17 Nov 17, 2023
7506b21
npm run build to get public folder in the server folder
fzinnah17 Nov 17, 2023
49e7787
changes to github strategy in auth.js
fzinnah17 Nov 17, 2023
ed85a30
add start script
fzinnah17 Nov 17, 2023
5430db9
Merge pull request #18 from fzinnah17/myesha_new
fzinnah17 Nov 17, 2023
13f3ecd
Update API URL in App.jsx
fzinnah17 Nov 17, 2023
18d177c
Refactor mockData.js file
fzinnah17 Nov 17, 2023
92cb3d8
Refactor import statement in Events.jsx
fzinnah17 Nov 17, 2023
b32161b
Remove import statement for mockData and add
fzinnah17 Nov 17, 2023
4f33f67
Update API URL in client code
fzinnah17 Nov 17, 2023
b303187
Update API URL in client code with server domain
fzinnah17 Nov 17, 2023
608d288
Update API URL in main.jsx
fzinnah17 Nov 17, 2023
2487372
Add CLIENT_URL constant and redirect root route to
fzinnah17 Nov 17, 2023
538cea9
Update API_URL in AuthContext.jsx
fzinnah17 Nov 17, 2023
fe4f500
Remove commented out code and update API_URL
fzinnah17 Nov 17, 2023
799da5e
Update package.json scripts for both client and server folders
fzinnah17 Nov 18, 2023
f567aa8
Delete unused files and update build configuration(dist)
fzinnah17 Nov 18, 2023
2fc5555
Fix static file serving issue in server.js
fzinnah17 Nov 18, 2023
eecb45a
Update API URL in Navbar component
fzinnah17 Nov 18, 2023
c873dce
Update Navbar component to pass apiUrl prop
fzinnah17 Nov 18, 2023
fe51c74
Update AuthProvider to include apiUrl prop
fzinnah17 Nov 18, 2023
9909cda
Fix authentication check dependency with apiUrl for authcontext.jsx
fzinnah17 Nov 18, 2023
cec9d4c
Refactor API URL handling by creating a new context file
fzinnah17 Nov 18, 2023
5ff59d2
Remove unused apiUrl prop from Navbar component
fzinnah17 Nov 18, 2023
865d03a
Update GitHub callback URL in auth.js
fzinnah17 Nov 18, 2023
4e5b06a
Add environment and client URL logging
fzinnah17 Nov 18, 2023
15f9554
Refactor GitHub authentication configuration
fzinnah17 Nov 18, 2023
6b1d81b
Update GitHub authentication callback URL
fzinnah17 Nov 18, 2023
622d68b
Commented out the redirect route in server.js
fzinnah17 Nov 18, 2023
6256e16
Fix API URL bug in DiscussionBoard and
fzinnah17 Nov 18, 2023
42c4844
Update README.md with the link to deployed app on railway
fzinnah17 Nov 18, 2023
a4b9a43
Refactor DiscussionBoard component and related
fzinnah17 Nov 18, 2023
017e1f8
Merge branch 'main' of https://github.com/fzinnah17/CodeFM
fzinnah17 Nov 18, 2023
6e31683
Update README.md
fzinnah17 Nov 18, 2023
f29f512
Update milestone5.md with the completed features
fzinnah17 Nov 18, 2023
33d60ac
Update milestone5.md
fzinnah17 Nov 18, 2023
6e1ddbc
Update milestone5.md
fzinnah17 Nov 18, 2023
6fe66b2
Update import path for EditPostModal component
fzinnah17 Nov 18, 2023
8b522bb
Add apiUrl parameter to createPost function
fzinnah17 Nov 18, 2023
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
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Binary file added ERD/CodeFM Ultra-2023-10-29-162922.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GIFs/CRUD_Backend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GIFs/CRUD_Frontend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GIFs/ExpressbackendandReactFrontend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GIFs/Railway Backend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 129 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,158 @@
# [your app name here]
# CodeFM

CodePath WEB103 Final Project
Designed and developed by: Myesha Mahazabeen & Farnaz Zinnah

Designed and developed by: [your names here]

🔗 Link to deployed app:
🔗 Link to deployed app: https://codefm-client-production.up.railway.app/

## About

CodeFM is a React based web app that provides vibrant online community for budding coders and tech enthusiasts. Our platform offers a supportive environment where users can access resources, connect with peers, and embark on their coding journey with confidence

### Description and Purpose

[text goes here]
- Users can sign up/ log in
- Users can create, read, update and delete posts, comment and react on others post (CRUD operations, One to Many)
- Users can access learning resorces posted by others and can add his/her findings as well
- Users can develop coding or other CS related skills based on preferences (beginner friendly)
- Can build strong network with like minded peers
- Newbeies can get guidance from experts and can learn coding from existing resources
- Users can get insightful information about upcoming events/career fair across the country
- Personalized learning environment


### Inspiration

[text goes here]
- Codecademy
- GitHub
- CodePath

## Tech Stack

Frontend:
Frontend: React JavaScript

Backend: Node.js, Express.js, PostgreSQL

Backend:

## Features

### [Name of Feature 1]
1. **Target Audience**: Focus on college computer science freshmen and sophomores.
2. **Personalized Learning**: Users can access resources from platforms like YouTube, Leetcode, and FreeCodeCamp.
3. **Connect with Peers**: Users can engage on discussion boards with CRUD operations.

### Baseline Features:

- ✅ 1. **Express backend and React frontend**: Express for the CRUD operations on the discussion boards and React to display content and allow user interactions.
<img src='https://github.com/fzinnah17/CodeFM/blob/main/GIFs/ExpressbackendandReactFrontend.gif' title='Video Walkthrough' width='' alt='Express React' />

- ✅ 2. **Dynamic Routes**: The discussion board would have dynamic routes for individual posts or discussions. For example, `/posts/:postId`.
- ✅ 3. **Deployment on Railway**: Railway for deployment.
<img src='https://github.com/fzinnah17/CodeFM/blob/main/GIFs/Railway%20Backend.gif' title='Video Walkthrough' width='400px' alt='Railway' />

- ✅ 4. **One-to-many database relationship**: Connection between users and their posts on the discussion board. One user can have multiple posts.
- ✅ 5. **Many-to-many with a join table**: Users can share multiple resources, and a single resource (like a YouTube tutorial). This requires a join table.
- ✅ 6. **RESTful API**:
- **GET**: Fetch a list of posts or resources.
- **POST**: Create a new post on the discussion board.
- **PATCH**: Edit an existing post.
- **DELETE**: Remove a post.
<img src='https://github.com/fzinnah17/CodeFM/blob/main/GIFs/CRUD_Backend.gif' title= 'Video Walkthrough'>
- ✅ 7. **Proper naming conventions for routes**: For instance:
- GET: `/api/posts/` to get all posts.
- POST: `/api/posts/` to create a new post.
- PATCH: `/api/posts/:postId` to edit a specific post.
- DELETE: `/api/posts/:postId` to delete a specific post.
- ✅ 8. **Frontend Redirection**: After submitting a new post, redirect the user back to the list of posts or to their newly created post.
- ✅ 9. **On-page interactions**: Users can create or edit a post on the same page without navigating to a new page.
<img src= 'https://github.com/fzinnah17/CodeFM/blob/main/GIFs/CRUD_Frontend.gif' title='Video Walkthrough'>

- ✅ 10. **Dynamic frontend routes with React Router**: Using React Router, you can create dynamic routes like `/posts/:postId` to view a specific post's details.
- ✅ 11. **Hierarchical React components**: Break down frontend components methodically:
- ✅ **Page components**: `Home`, `DiscussionBoard`, `ResourceList`.
- ✅ **Presenter components**: `Post`, `Comment`, `ResourceItem`.
- ✅ **Container components**: `PostContainer`, `ResourceContainer` (handles logic).


### Custom Features:

- ✅ 1. **Data Validation**: Validate any POST or PATCH requests to ensure that users aren't submitting empty or inappropriate content.

- ✅ 2. **Filtering**: Users could have the option to filter resources based on platforms or categories like "YouTube", "Leetcode", or "Articles".

###
###
###
###

## Features to be implemented in the future

### Target Audience
- **Focused Learning**: The app is specifically designed for college computer science freshman and sophomore students, ensuring content and resources are tailored to their needs.

[short description goes here]
### Personalized Learning
- **Skill Development**: Users can practice/learn coding with various resources from platforms like YouTube, Leetcode, FreeCodeCamp, etc., in different programming languages to improve technical skills and understanding.

### Connect with Peers
- **Engagement**: Users can join discussions and ask questions in a welcoming community of fellow learners and mentors.
- **Discussion Boards**: Full CRUD operations where users can create, read, update, and delete their posts. They can also comment and react to posts made by others, fostering a community-driven learning environment.

[gif goes here]
### Progress Tracking
- **Journey Monitoring**: Users can easily monitor their learning journey and see how their learning/engaging skills grow over time.
- **Achievements**: Users earn badges as they progress, providing visual feedback and motivation.

### [Name of Feature 2]
### Network Building
- **Networking**: Users can connect with like-minded peers, laying the foundation for future collaborations or study groups.
- **Guidance**: Newbies have the opportunity to seek guidance from senior students and alumni, bridging the knowledge gap.

[short description goes here]
### Resource Sharing
- **Resource Hub**: A dedicated section where users can access resources shared by the community. Users can both consume and add resources, establishing a many-to-many relationship in the database for shared resources.

[gif goes here]
### Career Insights
- **Events & Opportunities**: Users can get information about upcoming events, career fairs, free courses like CodePath, and internships such as Break Through Tech, ensuring they don't miss out on valuable opportunities.

### [Name of Feature 3]

### Technical Features (Baseline Features)

[short description goes here]
- **Integration**:
- **Express Backend**: The app uses an Express backend to handle server-side operations.
- **React Frontend**: A responsive frontend built with React for an interactive user experience.

[gif goes here]
- **Dynamic Routes**: The application includes dynamic routing capabilities for both the frontend and backend, ensuring a seamless user journey.

- **Deployment**: The web application is deployed on Railway with all pages and features fully operational.

- **Database Relationships**:
- **One-to-Many**: The app showcases a one-to-many relationship, evident in the interaction between users and their multiple posts.
- **Many-to-Many with a Join Table**: [Feature/Implementation details to be added when developed]

- **RESTful API**: Our backend features a robust API:
- **Request Types**: Supports GET (read), POST (create), PATCH (update), and DELETE (remove) requests.
- **Route Naming**: Proper naming conventions have been followed to maintain clarity and consistency.

- **Database Reset**: The app offers the functionality to reset the database to its default state, aiding in debugging and maintenance.

- **User Experience**:
- **Redirection**: Seamless redirections are implemented in several user flows for enhanced navigation.
- **On-Page Interactions**: Features such as creating posts are done without needing to reload or navigate away, enhancing user experience.

- **Frontend Routing**: Dynamic frontend routes are crafted using React Router, ensuring appropriate component rendering based on URLs.

- **Hierarchical React Components**:
- **Component Categorization**: The frontend's React components are organized methodically into specific categories, facilitating better code understanding and maintenance.
- **Component Types**: The app incorporates both container components (handling logic) and presenter components (handling UI), ensuring a clear separation of concerns.


### Custom Features

- **Filtering and Sorting**:
- **Role-based Resources**: The application provides filtering options tailored to specific roles in the tech industry. Whether a user is interested in software engineering, product management, or UX design, the resources and discussions can be filtered or sorted to cater to their specific needs.

- **Data Validation**:
- **Secure Submissions**: Before any data is updated in our database through POST or PATCH requests, the input is validated. For instance:
- When a user is discussing topics related to "MCAT" or "Medical School", the system checks for content relevance.
- An if-statement ensures that posts have proper categorization. If a user tries to submit without selecting a category, an error is thrown, ensuring that all posts are properly categorized and easily retrievable.

### [ADDITIONAL FEATURES GO HERE - ADD ALL FEATURES HERE IN THE FORMAT ABOVE; you will check these off and add gifs as you complete them]

## Installation Instructions

[instructions go here]
Login on website

13 changes: 13 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodeFM</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./src/main.jsx"></script>
</body>
</html>
Loading