vidithm / momentum Goto Github PK
View Code? Open in Web Editor NEWReddit-like social media app for CSCE 606 at Texas A&M
Reddit-like social media app for CSCE 606 at Texas A&M
Requirements: Description with UI sketch of main use cases (Vidith)
Database design: Description of data entities and relationships, entity-relationship diagram, SQL code to design database, sample date (Nathan)
Architectural design: Description of 3-tier architecture (e.g., UI, Logic, DB) (Nathan)
A runnable prototyping with GUI, database (if needed) (Vidith -> GUI, Nathan -> DB)
Video recordings of user acceptance tests (Vidith)
Frontend:
Backend:
Need to split up functionality into multiple microservices. Tentative plan:
The above 3 microservices are simply RESTful interfaces to the respective databases and perform no further business logic
We will have a GraphQL adapter component that accepts GraphQL requests from the client and dispatches requests to each of the above 3 microservices to fulfill the request (Nathan).
Each of these backend components will run as an independent application locally on its own port.
Architecture diagram:
Put here
Objective: create a Reddit/Twitter-like social media app with a HTML/bootstrap CSS + JS frontend and a Python/GraphQL backend. Functionality will include user accounts, communities, posts, and comments.
Application flow: The landing page of the app will allow users to either create an account or log into an existing account. Once signed in, users will have a home page where they can view all of the communities they are in, as well as options to join new communities or create a community. Each community has a page that will load its posts. Each individual post has a page with the full contents of the post as well as all comments associated with the post.
Problems I observed:
"data": {
"search_users": {
"error": null,
"users": [
{
"rid": 1, ------------------> this result is for user 1
"username": "nmcclaran",
"name": "Nathan",
"communities": [
{
"rid": 1,
"description": "A Test Community",
"users": [
{
"rid": 3 -----------------> user 1 is not in this community
}
]
},
null,
null
]
}
]
}
}
{
"message": "readexactly() called while another coroutine is already waiting for incoming data",
"locations": [
{
"line": 18,
"column": 17
}
],
"path": [
"search_users",
"users",
0,
"communities",
1,
"users"
],
"extensions": {
"exception": {
"stacktrace": [
"Traceback (most recent call last):",
" File \"/usr/local/lib/python3.11/site-packages/graphql/execution/execute.py\", line 528, in await_result",
" return_type, field_nodes, info, path, await result",
" ^^^^^^^^^^^^",
" File \"/Users/vidithm/projects/Momentum/momentum_gql/src/app/resolvers/types/community.py\", line 27, in resolve_users",
" rids = await users.search(",
" ^^^^^^^^^^^^^^^^^^^",
" File \"/Users/vidithm/projects/Momentum/momentum_gql/src/app/database/users.py\", line 185, in search",
" await cursor.execute(query, args)",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/cursors.py\", line 239, in execute",
" await self._query(query)",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/cursors.py\", line 457, in _query",
" await conn.query(q)",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/connection.py\", line 469, in query",
" await self._read_query_result(unbuffered=unbuffered)",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/connection.py\", line 683, in _read_query_result",
" await result.read()",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/connection.py\", line 1164, in read",
" first_packet = await self.connection._read_packet()",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/connection.py\", line 609, in _read_packet",
" packet_header = await self._read_bytes(4)",
" ^^^^^^^^^^^^^^^^^^^^^^^^^",
" File \"/usr/local/lib/python3.11/site-packages/aiomysql/connection.py\", line 657, in _read_bytes",
" data = await self._reader.readexactly(num_bytes)",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
" File \"/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/streams.py\", line 729, in readexactly",
" await self._wait_for_data('readexactly')",
" File \"/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/streams.py\", line 508, in _wait_for_data",
" raise RuntimeError(",
"RuntimeError: readexactly() called while another coroutine is already waiting for incoming data"
],
"context": {
"self": "<StreamReader..., bufsize=0>>>",
"func_name": "'readexactly'"
}
}
}
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.