You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UNI.CON is a social networking platform that connects students and schools with each other. Powered by Django and FAISS, we have implemented an innovative algorithm that adapts to each student's interests and provides an ideal space for sharing thoughts. We include an anonymous posting system to encourage open expression. Furthermore, our unique UNI.CON feature also allows users to share articles across different universities.
Tech Stack
Cloud Infrastructure
EC2 Instance
Hosting the Web Server, Frontend, Backend.
Web Server
Nginx
Reverse Proxying between clients and backend servers.
Encrypting and decrypting traffic using HTTPS.
Frontend
HTML & CSS & JavaScript (Powered by React & Vite)
Markup and Styling for web page.
Backend
Django
Building the API logic for the server.
FAISS
Handle embedding search.
Open AI
Generate embedding vectors of the content.
Redis
Storing the frequent access data
SQLite
Storing static data.
ERD
We designed the database to satisfy all of the 1NF, 2NF, 3NF, and BCNF, except for a few special attributes.
Definitely, the embedding_vector stores multiple values into a single column in violation of 1NF, but this decision was made to optimize vector similarity search performance using FAISS.
The likes_count and comment_count may seem redundant since they can be calculated by counting the data. However, we chose to include these attributes because they contain frequently accessed data and their potential inaccuracy does not significantly impact the user experience. We would choose not to store them if the structure is simple and the traffic to the attributes are not significant, but based on the traditional cases from other SNS platform, it seems reasonable exception to avoid the Justin Bieber Problem.
Implementation Instructions
⚠️These are the instructions for running the server in debug mode.
Prerequisites:
docker
docker-compose
node.js
Necessary files
.env
postgresql/
0. Place the necessary files
The .env file contains secrets and configuration settings for debug mode that need to be modified later. The postgresql/ directory contains PostgreSQL data, including table structures and values.
.env → UNI.CON/backend/
postgresql/ → UNI.CON/backend/
1. Change to Debug mode
After placing the necessary files in the UNI.CON/backend/ directory, change the DEBUG setting from False to True in the .env file.
DEBUG = True
OPE... and more
Navigate to UNI.CON/frontend/src/constants.jsx and change the DEBUG value from false to true as shown below
constDEBUG=trueletdom... andmore
2. Set up frontend
Navigate to the UNI.CON/frontend/ directory, install all necessary packages using npm install, and run npm run dev to start the frontend server.
3. Set up Backend
Navigate to the UNI.CON/backend/ directory, then build the image and run the container using the docker-compose.debug.yml file by running: docker compose -f docker-compose.debug.yml up.
{
"id": 1,
"user": 1,
"created_at": "2024-12-01T12:45:39.315668Z",
"comments_count": 0,
"likes_count": 0,
"body": "Something new..",
"article": 1,
"parent_comment": 1, #(null if it is not a nested comment)"user_school": "UNSW",
"user_temp_name": "random-name",
"user_static_points": "100",
"like_status": false,
"deleted": false,
"edited": false,
}
Condition
Status
Progress
Correct request
200 OK
TESTED✅
Incorrect token
401 Unauthorized
TESTED✅
Incorrect validation code
401 Unauthorized
TESTED✅
Unlike article from other school (Non UIO.CON)
404 Not Found
TESTED✅
Unlike comment again
304 Not Modified
TESTED✅
About
UNI.CON is a social networking platform that connects students and schools with each other. Powered by Django and FAISS, we have implemented an innovative algorithm that adapts to each student's interests and provides an ideal space for sharing thoughts. We include an anonymous posting system to encourage open expression.