Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
b9783db
Created all api files
kanghosaeyo Aug 12, 2025
e2ac6ee
added database
kanghosaeyo Aug 12, 2025
45470a8
Merge pull request #1 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
60aee78
put stuff in the database
kanghosaeyo Aug 12, 2025
3f17845
Merge pull request #2 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
1dedfd4
Renamed folders
aga1936 Aug 12, 2025
06a60db
Renamed folders
aga1936 Aug 12, 2025
db8e240
added route for updating student profiles in /users
kanghosaeyo Aug 12, 2025
991d584
Merge pull request #3 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
d68d89e
query for finding status of application for student
aga1936 Aug 12, 2025
c00ede5
updated application status viewing api calls
kanghosaeyo Aug 12, 2025
7313d0f
Merge pull request #5 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
b37286d
Added company viewin
kanghosaeyo Aug 12, 2025
1a5507c
Merge pull request #6 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
a4f369c
added api for viewing avgPay per industry
kanghosaeyo Aug 12, 2025
9b459be
Merge pull request #7 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
a0a6962
Added and edited api routes for avg pay, placement data, company ratings
kanghosaeyo Aug 12, 2025
6342449
Merge pull request #8 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
55a02df
added api routes for identifying students with few apps
kanghosaeyo Aug 12, 2025
8b1d36e
Merge pull request #9 from kanghosaeyo/oscar
kanghosaeyo Aug 12, 2025
f225d16
added query for persona 1 to view num apps
aga1936 Aug 13, 2025
dc916b3
change position preference
aga1936 Aug 13, 2025
84a5d40
fixed error with applications route for students
aga1936 Aug 13, 2025
58842a9
fixed typo in function name in applications
aga1936 Aug 13, 2025
0fa835a
created main page
kanghosaeyo Aug 13, 2025
d64638f
Merge pull request #10 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
6c506fa
Added all the home pages for each persona
kanghosaeyo Aug 13, 2025
249a926
Merge pull request #11 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
6dd6c1c
api route for deadlines
aga1936 Aug 13, 2025
f44659d
Added mock data
kanghosaeyo Aug 13, 2025
000b6f7
Merge pull request #12 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
43ef2ab
deleted question mark
kanghosaeyo Aug 13, 2025
232e045
Merge pull request #13 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
a2412f9
api route for desired skills
aga1936 Aug 13, 2025
9819d26
Merge branch 'ana_antic'
aga1936 Aug 13, 2025
0c3939d
api for required skills
aga1936 Aug 13, 2025
427ccc8
Merge branch 'ana_antic'
aga1936 Aug 13, 2025
f53899a
Fixed database and updated student page
kanghosaeyo Aug 13, 2025
8d0cb8f
Merge branch 'main' of https://github.com/kanghosaeyo/Coopalytics int…
kanghosaeyo Aug 13, 2025
d7e8ae5
Merge pull request #14 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
91f360d
employer view profile
allymayo Aug 13, 2025
81f9905
ignor
kanghosaeyo Aug 13, 2025
d72a552
Merge pull request #15 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
379eaf4
reverted back to no api connection in student home, can someone help me
kanghosaeyo Aug 13, 2025
2c70f68
Merge pull request #16 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
23cded6
filter applicants
allymayo Aug 13, 2025
db3e8e5
added all pages + fixed side bar navigation
kanghosaeyo Aug 13, 2025
6b46845
Merge pull request #17 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
fca9d30
allow admins to review job postings before approval, shows unflagged …
suripeddis Aug 13, 2025
29ac429
exmployer post position
allymayo Aug 13, 2025
9749767
admine can review positions before they go live
suripeddis Aug 13, 2025
f209950
admin can review positions (redo)
suripeddis Aug 13, 2025
b3a8466
Merge pull request #18 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
eb31949
added api calls in student homepage and fixed mock data
kanghosaeyo Aug 13, 2025
55ae2a4
Merge pull request #19 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
5b45eeb
Add a simple admin list of jobs to review that shows unflagged co-op …
suripeddis Aug 13, 2025
07e5cb8
employer view applications
allymayo Aug 13, 2025
7df67d6
Merge pull request #20 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
9fb9899
Admin can approve a co-op positions by setting the flag to false
suripeddis Aug 13, 2025
c947e47
sets the flagged to false
suripeddis Aug 13, 2025
a409065
Merge pull request #21 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
df09a4e
Allow admins to delete unapproved or invalid co-op postings that are …
suripeddis Aug 13, 2025
82f22e9
setting flagged to true will delete a posting
suripeddis Aug 13, 2025
464b0a7
Merge pull request #22 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
7fe0601
Admins can now create employer student and advisor profiles by sendin…
suripeddis Aug 13, 2025
c387787
student creates aplication
allymayo Aug 13, 2025
b6f6a62
Merge pull request #23 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
e00791c
Allow admins to delete a user by sending a DELETE request with a user…
suripeddis Aug 13, 2025
8f2bfc1
Merge pull request #24 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
20b2ab9
Admin views preference metrics of different postings
suripeddis Aug 13, 2025
b0e50d5
Merge pull request #25 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
e83cb46
admin has the ability to flag a position with issues now
suripeddis Aug 13, 2025
e8bb57f
admin can flag positions that have issues
suripeddis Aug 13, 2025
03c061e
Merge pull request #26 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
89e5f34
admin can remove the flag on the coop position if it was fixed or cha…
suripeddis Aug 13, 2025
3b16b2a
Merge pull request #27 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
2bed251
Connected api with student home page + fixed database & mock data
kanghosaeyo Aug 13, 2025
10ca501
Merge pull request #28 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
8dee103
For each company this tells us how many applications came from each g…
suripeddis Aug 13, 2025
b4f0046
Merge pull request #29 from kanghosaeyo/saumya
suripeddis Aug 13, 2025
ca400e7
Merge branch 'main' into Ally
allymayo Aug 13, 2025
a003398
Merge pull request #31 from kanghosaeyo/Ally
kanghosaeyo Aug 13, 2025
812178c
remove employer view route
allymayo Aug 13, 2025
4dde230
Merge pull request #32 from kanghosaeyo/Ally
allymayo Aug 13, 2025
00f86d8
typo
kanghosaeyo Aug 13, 2025
0943393
Merge pull request #33 from kanghosaeyo/oscar
kanghosaeyo Aug 13, 2025
607cab7
fix routes
allymayo Aug 14, 2025
4798387
Merge pull request #34 from kanghosaeyo/Ally
allymayo Aug 14, 2025
60d96f6
updated routes for persona 1
aga1936 Aug 14, 2025
1e05e58
trouble shooting issues with student profile
aga1936 Aug 14, 2025
65733cc
fixed issues with api and routes to connect to db
aga1936 Aug 14, 2025
3850524
api routing edits
engamy Aug 14, 2025
ef41b03
updated Student_Home to fix errors with skills section
aga1936 Aug 14, 2025
c132baa
adding company profile user story routes
engamy Aug 14, 2025
4fd803a
resolving merge conflicts
engamy Aug 14, 2025
b953bce
figuring out the missing blueprint imports
suripeddis Aug 14, 2025
266bb70
Merge pull request #35 from kanghosaeyo/saumya
suripeddis Aug 14, 2025
bc7868f
merge main with branch Amy
engamy Aug 14, 2025
c4c9e37
Connect Admin Home Streamlit page to API for pending co-op positions …
suripeddis Aug 14, 2025
667a115
Merge pull request #37 from kanghosaeyo/saumya
suripeddis Aug 14, 2025
15dd448
trying to merge :(
suripeddis Aug 14, 2025
ca9c099
attempting to merge
suripeddis Aug 14, 2025
5b1704b
redoing the admin home again
suripeddis Aug 14, 2025
5f096d7
Created the calendar for Student to view deadlines for coops that the…
aga1936 Aug 14, 2025
8cec21e
Merge branch 'ana_antic'
aga1936 Aug 14, 2025
b4169f9
show the first 5 pending positions
suripeddis Aug 14, 2025
e1b56d9
show the first 5 pending positions
suripeddis Aug 14, 2025
6d5af26
Merge pull request #38 from kanghosaeyo/saumya
suripeddis Aug 14, 2025
47ba929
Added route to pull all co-op positions
aga1936 Aug 14, 2025
08ef7a2
Merge branch 'ana_antic'
aga1936 Aug 14, 2025
2fc3033
move admin to app instead of backend
suripeddis Aug 14, 2025
02b3a17
merge conflicts
suripeddis Aug 14, 2025
88b3e1d
added advisor home page
kanghosaeyo Aug 14, 2025
854a62c
changed API_BASE
suripeddis Aug 14, 2025
e624e0a
Merge pull request #40 from kanghosaeyo/oscar
kanghosaeyo Aug 14, 2025
37ac13f
see the pending coop positions
suripeddis Aug 14, 2025
31d9b4c
format
allymayo Aug 14, 2025
cd82a8e
Merge branch 'saumya'
suripeddis Aug 14, 2025
822b6d7
employer homepage
allymayo Aug 14, 2025
de35ead
employer pages
allymayo Aug 14, 2025
3223760
postings page title
allymayo Aug 14, 2025
6367ce3
redoing admin_home because nothing is loading/working
suripeddis Aug 14, 2025
2fd1b3b
remerging to see if this works
suripeddis Aug 14, 2025
5d27ccb
employer home page
allymayo Aug 14, 2025
b1d6830
started from scratch for admin home
suripeddis Aug 14, 2025
e4c7e42
Merge pull request #41 from kanghosaeyo/Ally
allymayo Aug 14, 2025
b948fe9
Resolved merge conflict in Admin Home page
suripeddis Aug 14, 2025
c4ad21d
implemented flagging in advisor
kanghosaeyo Aug 14, 2025
5238983
deleted unnecessary advisor route
kanghosaeyo Aug 14, 2025
25ba97b
Added the admin employer information
suripeddis Aug 14, 2025
b446bdb
Merge main←saumya: keep saumya version of Admin_Home
suripeddis Aug 14, 2025
0749cc1
co-op position view for students, has 404 error for retrieving positions
aga1936 Aug 14, 2025
d25446d
attempt at displaying all coop positions
engamy Aug 14, 2025
12c7479
attempting to display coop positions
engamy Aug 14, 2025
417aa54
Admin can now see the pending posts still approve button still not wo…
suripeddis Aug 14, 2025
07066e8
Created Advisor Analytics page
kanghosaeyo Aug 14, 2025
b02eaf3
checking merge properly
suripeddis Aug 14, 2025
e39b2ec
advisor-company ratings page
engamy Aug 14, 2025
7052cb0
advisor companies
engamy Aug 14, 2025
c5bf6d1
reverted changes
kanghosaeyo Aug 14, 2025
aa18f22
advisor company rating info
engamy Aug 14, 2025
9db1dd3
fixed api routes for admin employers
kanghosaeyo Aug 14, 2025
c3402db
adding admin postings now
suripeddis Aug 14, 2025
3a2a1b8
advisor company ratings
engamy Aug 14, 2025
52b8ce7
removing old comments
engamy Aug 14, 2025
8d3e29c
recommitting the admin postings because its not showing in the main
suripeddis Aug 15, 2025
91357e2
a
suripeddis Aug 15, 2025
1547cd4
Merge branch 'main' into saumya
suripeddis Aug 15, 2025
e30aa2e
Merge pull request #51 from kanghosaeyo/saumya
kanghosaeyo Aug 15, 2025
a05d0ae
fixed routing
kanghosaeyo Aug 15, 2025
c91f2fd
Merge pull request #52 from kanghosaeyo/oscar
kanghosaeyo Aug 15, 2025
9b4069b
fixed routes AGAIN
kanghosaeyo Aug 15, 2025
bb839cb
Merge pull request #53 from kanghosaeyo/oscar
kanghosaeyo Aug 15, 2025
03dad5a
Merge branch 'Amy'
engamy Aug 15, 2025
9a769d0
reset to working version for everyone, added in browse positions again
aga1936 Aug 15, 2025
8ddcda4
deleted prefixes and fixed api routes in student home and advisor home
kanghosaeyo Aug 15, 2025
f2292ba
Merge pull request #54 from kanghosaeyo/oscar
kanghosaeyo Aug 15, 2025
c5b9d5a
Merge branch 'ana_antic'
aga1936 Aug 15, 2025
716033a
attempting student analytics
engamy Aug 15, 2025
071488a
student viewing past coop wage data
engamy Aug 15, 2025
317a027
cleaning up routing for users and company profiles
engamy Aug 15, 2025
190e289
employer home page fixes
engamy Aug 15, 2025
c9c3f14
adding user routes for admin analytics
engamy Aug 15, 2025
2d095a2
admin analytics page
engamy Aug 15, 2025
582edd3
cleaning up code
engamy Aug 15, 2025
ac420f5
adding advisor student management page
engamy Aug 15, 2025
1f1f39d
editing admin analytics UI
engamy Aug 15, 2025
f2ded4b
removing additional info section in employer posting position
engamy Aug 15, 2025
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
File renamed without changes.
4 changes: 2 additions & 2 deletions api/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ SECRET_KEY=someCrazyS3cR3T!Key.!
DB_USER=root
DB_HOST=db
DB_PORT=3306
DB_NAME=northwind
MYSQL_ROOT_PASSWORD=<put a good password here>
DB_NAME=coopalytics
MYSQL_ROOT_PASSWORD=" "
56 changes: 56 additions & 0 deletions api/backend/advisoradvisee/advisoradvisee_routes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from flask import Blueprint
from flask import request
from flask import jsonify
from flask import make_response
from flask import current_app
from backend.db_connection import db

advisoradvisee = Blueprint('advisoradvisee', __name__)

# Advisor identifies students with too few applications
@advisoradvisee.route('/advisor/<advisorID>/students/low-applications', methods=['GET'])
def get_students_with_low_applications(advisorID):
current_app.logger.info('GET /advisor/<advisorID>/students/low-applications route')

query = '''
SELECT u.userId,
u.firstName,
u.lastName,
COUNT(apps.applicationId) AS totalApps
FROM advisor_advisee aa
JOIN users u ON u.userId = aa.studentId
LEFT JOIN appliesToApp ata ON ata.studentId = u.userId
LEFT JOIN applications apps ON ata.applicationId = apps.applicationId
WHERE aa.advisorId = {0}
GROUP BY u.userId, u.firstName, u.lastName
HAVING COUNT(apps.applicationId) < 5
ORDER BY totalApps ASC, u.lastName;
'''.format(advisorID)

cursor = db.get_db().cursor()
cursor.execute(query)
theData = cursor.fetchall()

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response

# Admin reassigns students to different advisors as needed
@advisoradvisee.route('/admin/<studentId>/<advisorId>',
methods = ['PUT'])
def reassignAdvisor():
current_app.logger.info('PUT /admin/<studentId>/<advisorId> route')
advisorId = request.json
studentId = request.json

query = '''
UPDATE advisor_advisee
SET advisorId = %s
WHERE studentId = %s;
'''
data=(advisorId, studentId)
cursor = db.get_db().cursor()
r = cursor.execute(query, data)
db.get_db().commit()
return 'advisor reassigned successfully'

155 changes: 155 additions & 0 deletions api/backend/applications/applications_routes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
from flask import Blueprint
from flask import request
from flask import jsonify
from flask import make_response
from flask import current_app
from backend.db_connection import db

# New Blueprint for applications
applications = Blueprint('applications', __name__)


# Student viewing their own application statuses
@applications.route('/student/<studentID>/applications', methods=['GET'])
def get_student_applications(studentID):
current_app.logger.info('GET /student/<userID>/applications route')

query = '''
SELECT u.userId,
u.firstName,
u.lastName,
a.applicationId,
a.status AS applicationStatus,
cp.title AS positionTitle,
cp.deadline AS applicationDeadline,
com.name AS companyName,
a.dateApplied,
cp.description AS positionDescription
FROM users u
JOIN appliesToApp ata ON u.userId = ata.studentId
JOIN applications a ON ata.applicationId = a.applicationId
JOIN coopPositions cp ON a.coopPositionId = cp.coopPositionId
JOIN companyProfiles com ON cp.companyProfileId = com.companyProfileId
WHERE u.userId = %s
ORDER BY a.dateApplied DESC, cp.deadline ASC
'''

cursor = db.get_db().cursor()
cursor.execute(query)
theData = cursor.fetchall()

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response

# student sees how many positions they have applied to
@applications.route('/student/<studentID>/applications/summary', methods=['GET'])
def get_numb_apps(studentID):
current_app.logger.info('GET /student/<studentID>/applications route')

query = '''
SELECT a.status,
COUNT(*) AS ApplicationCount
FROM applications a
JOIN appliesToApp ata ON a.applicationId = ata.applicationId
WHERE ata.studentId = %s
GROUP BY a.status

'''

cursor = db.get_db().cursor()
cursor.execute(query, (studentID,))
theData = cursor.fetchall()

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response



# Advisor viewing all their advisees' application statuses
@applications.route('/advisor/<advisorID>/students/applications', methods=['GET'])
def get_advisor_student_applications(advisorID):
current_app.logger.info('GET /advisor/<advisorID>/students/applications route')

query = '''
SELECT aa.advisorId,
u.userId,
u.firstName,
u.lastName,
a.applicationId,
a.status AS applicationStatus,
cp.title AS positionTitle,
cp.deadline AS applicationDeadline,
com.name AS companyName,
a.dateApplied
FROM advisor_advisee aa
JOIN users u ON aa.studentId = u.userId
JOIN appliesToApp ata ON u.userId = ata.studentId
JOIN applications a ON ata.applicationId = a.applicationId
JOIN coopPositions cp ON a.coopPositionId = cp.coopPositionId
JOIN companyProfiles com ON cp.companyProfileId = com.companyProfileId
LEFT JOIN workedAtPos wp ON u.userId = wp.studentId AND wp.coopPositionId = cp.coopPositionId
WHERE aa.advisorId = {0}
ORDER BY u.lastName, u.firstName, a.dateApplied DESC
'''.format(advisorID)

cursor = db.get_db().cursor()
cursor.execute(query)
theData = cursor.fetchall()

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response

# Employer views all applications of a posting
@applications.route('/applications/<int:coopPositionId>', methods=['GET'])
def get_applications(coopPositionId):
current_app.logger.info('GET /applications/%s', coopPositionId)

query = '''
SELECT a.dateTimeApplied, a.status, a.resume, a.gpa, a.coverLetter,
a.coopPositionId, a.applicationId
FROM applications a
JOIN coopPositions cp ON a.coopPositionId = cp.coopPositionId
WHERE a.coopPositionId = %s
ORDER BY a.dateTimeApplied DESC;
'''
cursor = db.get_db().cursor(dictionary=True)
cursor.execute(query, (coopPositionId,))
theData = cursor.fetchall()

return make_response(jsonify(theData), 200)

# Student applies to a position
@applications.route('/users/appliesToApp/applications', methods=['POST'])
def create_application():
current_app.logger.info('GET /applications')
application_info = request.json
datetime_applied = application_info['dateTimeApplied']
status = application_info['status']
resume = application_info['resume']
gpa = application_info['gpa']
cover_letter = application_info['coverLetter']
coop_position_id = application_info['coopPositionId']
application_id = application_info['applicationId']


query = '''
INSERT INTO applications
VALUES (dateTimeApplied = %s,
status = %s,
resume = %s,
gpa = %s,
coverLetter = %s,
coopPositionId = %s,
applicationId = %s);
'''
data = (datetime_applied, status, resume, gpa, cover_letter,
coop_position_id, application_id)

cursor = db.get_db().cursor()
r = cursor.execute(query, data)
db.get_db().commit()
return 'application submitted!'

44 changes: 44 additions & 0 deletions api/backend/companyProfiles/companyProfiles_routes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from flask import Blueprint
from flask import request
from flask import jsonify
from flask import make_response
from flask import current_app
from backend.db_connection import db

companyProfiles = Blueprint('companyProfiles', __name__)

# Student/Advisor views a company profile
@companyProfiles.route('/companyProfiles/<companyProfileId>', methods=['GET'])
def get_company_profile(companyProfileId):
query = '''
SELECT *
FROM companyProfiles
WHERE companyProfileId = %s
'''.format(companyProfileId)

cursor = db.get_db().cursor()
cursor.execute(query)
columns = [col[0] for col in cursor.description]
theData = [dict(zip(columns, row)) for row in cursor.fetchall()]

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response

# Advisor views all company profiles
@companyProfiles.route('/companyProfiles', methods=['GET'])
def get_all_company_profiles():
query = '''
SELECT companyProfileId, name, bio, industry, websiteLink
FROM companyProfiles
ORDER BY name
'''

cursor = db.get_db().cursor()
cursor.execute(query)
columns = [col[0] for col in cursor.description]
theData = [dict(zip(columns, row)) for row in cursor.fetchall()]

the_response = make_response(jsonify(theData))
the_response.status_code = 200
return the_response
Loading