Skip to content

oakj/pseudo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pseudo

Welcome to Pseudo. We are building a mobile application that allows users to solve coding interview questions using pseudocode.

Project Documentation

Refer to ./instructions/instructions.md for high level details on the project such as: - Project Overview - Core Functionalities (features and screens) - Database Schema - S3 Blob Storage Structure - Python Data Models (for FastAPI backend) - Project File Structure

Git Workflow

  • main for production
  • dev for development
    • Can be merged into main after review and testing.
    • Intended to be used if there are multiple feature branches in progress and requires joint testing.
  • feature/ for new features
    • Can be merged into main after review and testing.

Repository Structure

  • .github: for copilot-instructions.md if we decide to use GitHub Copilot.
  • backend: for Pseudo, a FastAPI backend and any future backend services.
  • frontend: for Pseudo, a React Native frontend and any future frontend services.
  • instructions: for file used to give LLMs context on specific parts of the project.
  • notes: for unorganized or random notes and utils for the project.

Todos

  • Move specific, non-instruction and non-README files to Notion (or other markdown-compatible markdown editors).
    • We don't want to leak any sensitive design information or queries in the git history.
  • Setup Supabase authentication and postgresql database. Include some dummy data for testing.
    • Setup Supabase authenticaton
      • Setup e-mail/password authentication
        • Enable e-mail/password authentication in Supabase
      • Setup Google authentication
        • Google OAuth Client ID and Client Secret created
        • Enable Google OAuth in Supabase
        • Need to update Google API Console with authorized Javascript origins and authorized redirect URLs
      • Setup Apple authentication
        • Probably need an Apple Developer Program account for this
        • Apple OAuth Client ID and Client Secret created
        • Enable Apple OAuth in Supabase
        • Need to update Apple Developer Account with authorized redirect URLs
      • Consider adding a GitHub OAuth also
    • Setup Supabase database
    • Create a database function and trigger to automatically create a record in app_user table when a new user signs up via Supabase auth.
    • [] Setup Supabase dummy data.
      • Delete old dummy data
      • Create a new database trigger that will create dummy data when a record is inserted into app_user table
      • Update dummy-data.md to reflect the new script and process for enabling/disabling the trigger
      • Maybe we can keep the dummy data and create a new database for production that has real data?
    • Create SQL scripts and/or stored procedures to be used by the app.
    • Setup S3/Blob-storage dummy data.
      • Start by storing dummy data in the backend/dummy-data folder.
        • Create 10 questions. Each question should have it's own file.
        • Create a userquestion record for (10) of the questions. Half are solved, half are not.
      • Once we feel comfortable testing with dummy data, we should start to move them to a real blob storage service (or use local storage on the python server).
  • Note: we are developing the frontend "first" because we want to POC the app using dummy data. Typically the backend is developed first.
  • Setup Home screen.
  • Setup Question Groups screen.
  • Setup Questions screen.
  • Setup Solve screen (using dummy data for hints ai chat bot and pseudocode validation engine)
    • At this point we should have a hard-decision on how we want to use the hints and ai chat bot. At this point I think it should be a one-way chat bot that only gives hints.
  • Setup Login/Signup screen. This is near the end because we need to POC that the other screens can work as intended. Login/Signup implementation is straight forward.
  • Setup Profile screen. This is near the end because we need to POC that the other screens can work as intended. Profile implementation is straight forward.
  • Develop the FastAPI backend.
    • Create endpoint contracts
    • Create endpoints
  • Setup server for running python backend and storing blob storage data.
    • Consider Digital Ocean for hosting and see if it can store blob data.
    • Consider S3 alternatives for blob storage if we cannot store it in Digital Ocean.
  • Consider splitting the supabase project into separate development and production projects.
  • Install/implement capabilities for using Expo EAS build. This is only needed for production builds.
  • Setup CI/CD pipelines. This should only happen after sampling the app to real users to see if its even worth brining to market with consistent updates.
    • Bonus task for implementing a CI/CD pipeline via GitHub repository.
    • Bonus task for implementing a CI/CD pipeline for database migrations using Supabase (probably should be part of backend/pseudo python project)
      • Note that the initial DB table creations were created via SQL editor in Supabase. We should have this in code somewhere for historical purposes.
      • For Supabase database migrations, it's recommended to use the Supabase CLI. We can build this as part of GitHub Actions.
  • Create a landing page for the app.
  • Once we get a decent MVP in production, we should start sampling the app with real users.
    • Reach out to Codesmith users.
    • Reach out to Coffee & Code users.
    • Reach out to coding subreddits/online communities.
  • Consider setting up a feedback loop screen in the app.
    • Brainstorm the best way to get feature review and feedback from users. Do we want a screen for all requests? Do we want a review feature for each question?
  • Consider charging a fair price once we see users are happy with the product. Consider different pricing models.
    • Consider a freemium-premium model where flashcards and games are free and the pseudocode evaluator is premium.
  • Consider adding a "Flashcard" feature to the app.
  • Create a markdown file discussing major flows in the app. Emphasis on how data is inserted, updated, fetched, indexed, cached, stored, and served to the user.
    • Consider adding a "pattern matching" flow to the pseudocode evaluator. Intent is to avoid going to an LLM if we don't need to.

On-going Changes To Consider

Status
🟒 Implemented
🟑 Under Consideration OR Not Yet Implemented
πŸ”΄ Not Implementing
# Priority Title Description Notes Status Decision
1 Low Difficulty Field Type in Question Table Use ENUM data type in the API and app. INT in the database. Could improve lookup speed. Is this change beneficial at this point? πŸ”΄ Not implementing. At this point in the project, the benefits do not outweigh the work required to make this change.
2 Low Pseudocode Evaluator as Premium Feature Making pseudocode evaluator a paid feature Could offer flashcards and study games as free features. May help manage user expectations and feedback because the pseudocode evaluator will be finicky. 🟑 Under consideration. This should be considered with other pricing options once the MVP is complete.
3 Medium Question Loading Strategy Current method of fetching all questions on login may cause performance issues as question count grows; need alternative strategy Consider creating a RecentlyVisited table for questions and collections a user visited recently and load those plus default collections and "default"/hand-picked questions. 🟑 Not yet implemented. We need a design document showing the necessary changes. This project is better suited for when we are at (or close to) MVP.
4 High User ID Integer Field Adding user_id_int field to public.app_user table Could significantly improve SQL query performance by using integer comparisons instead of string comparisons 🟑 Not yet implemented. Will target this after some initial testing of the app.
5 Low Dark Mode Preference Data Type Changing dark_mode_preference from VARCHAR to INT Using an enumerable data type could represent different modes more efficiently (0 for system default, 1 for light, 2 for dark) πŸ”΄ Not implementing. At this point in the project, the benefits do not outweigh the work required to make this change.
6 High User Question Record Creation Creating user_question records on first attempt Implement to create records when a user first attempts a specific question, rather than pre-creating for all questions 🟑 Not yet implemented. This will likely be implemented once we start coding the app and api.
7 Medium Weekly Streak Record Management Handling weekly_streak records Implemented solution to insert or update weekly_streak records when a user successfully solves a problem. 🟒 Implemented as much as we can in terms of where we are at currently with the app development.
8 High Collection Table Simplification Simplifying the collection system Implement a single Collection table with a "default" boolean column to distinguish between default and custom collection. πŸ”΄ Not implementing. It is a technical decision to keep two separate tables (Collection and DefaultCollection).
9 Medium Hints and AI Chat Bot Make a decision on how the AI chat bot will work for MVP. Implement a one-way chat bot that only gives hints OR implement a two-way chat bot where users can ask for hints. 🟑 Under consideration. This will likely be decided on and implemented with the Solve screen.
10 Low Admin page We need admin endpoints for creating, updating, and deleting questions and default collections. Should this live with the app's landing page or its own webapp? 🟑 Under consideration. This is close to MVP or post MVP. Leading towards adding this to the landing page. Will need a hidden route and auth for the page.

Project File Tree

pseudo
β”œβ”€ backend
β”‚  └─ storage
β”‚     β”œβ”€ blob
β”‚     β”‚  β”œβ”€ formatting.md
β”‚     β”‚  └─ submission-eval-flow.md
β”‚     β”œβ”€ dummy-data
β”‚     β”‚  β”œβ”€ blob-dummy-data.md
β”‚     β”‚  β”œβ”€ questions
β”‚     β”‚  β”‚  β”œβ”€ L-1.json
β”‚     β”‚  β”‚  β”œβ”€ L-102.json
β”‚     β”‚  β”‚  β”œβ”€ L-121.json
β”‚     β”‚  β”‚  β”œβ”€ L-127.json
β”‚     β”‚  β”‚  β”œβ”€ L-15.json
β”‚     β”‚  β”‚  β”œβ”€ L-20.json
β”‚     β”‚  β”‚  β”œβ”€ L-200.json
β”‚     β”‚  β”‚  β”œβ”€ L-23.json
β”‚     β”‚  β”‚  β”œβ”€ L-295.json
β”‚     β”‚  β”‚  └─ L-3.json
β”‚     β”‚  β”œβ”€ sql-dummy-data.md
β”‚     β”‚  └─ userquestions
β”‚     β”‚     β”œβ”€ 294a924b-4591-45ea-b3dd-c6c9c6112b2e.json
β”‚     β”‚     β”œβ”€ 510f9dcc-464e-48ff-a920-43518eabbd54.json
β”‚     β”‚     β”œβ”€ 803d9755-94ed-4749-9ed9-83e7b3f5abba.json
β”‚     β”‚     β”œβ”€ 83481541-f24b-4906-b867-751125527037.json
β”‚     β”‚     β”œβ”€ 8f580c6e-3c8e-4502-91de-21aafa7521f7.json
β”‚     β”‚     β”œβ”€ 9756b403-0988-428f-9368-d16e8a520687.json
β”‚     β”‚     β”œβ”€ cc61c2ec-30cf-405c-ba27-77708eac1ab2.json
β”‚     β”‚     β”œβ”€ dba22364-c980-4a6e-bc54-566b609914c8.json
β”‚     β”‚     β”œβ”€ df576c81-0d19-4471-83ae-511e1bbc4271.json
β”‚     β”‚     └─ e69cbd17-09f6-4864-968a-de42da46df10.json
β”‚     └─ supabase
β”‚        └─ database-scripts
β”‚           β”œβ”€ README.md
β”‚           β”œβ”€ sprocs
β”‚           β”‚  β”œβ”€ DeleteCollectionByUserId.sql
β”‚           β”‚  β”œβ”€ InsertCollectionByUserId.sql
β”‚           β”‚  β”œβ”€ InsertUserQuestion.sql
β”‚           β”‚  β”œβ”€ SelectCollectionByUserId.sql
β”‚           β”‚  β”œβ”€ SelectCollectionsByUserId.sql
β”‚           β”‚  β”œβ”€ SelectDefaultCollectionByUserId.sql
β”‚           β”‚  β”œβ”€ SelectProfileByUserId.sql
β”‚           β”‚  β”œβ”€ SelectQuestionsByUserId.sql
β”‚           β”‚  β”œβ”€ SelectUserQuestion.sql
β”‚           β”‚  β”œβ”€ SelectWeeklyStreakByUserId.sql
β”‚           β”‚  β”œβ”€ UpdateCollectionNameByUserId.sql
β”‚           β”‚  β”œβ”€ UpdateProfileByUserId.sql
β”‚           β”‚  β”œβ”€ UpdateUserQuestion.sql
β”‚           β”‚  └─ UpdateWeeklyStreakByUserId.sql
β”‚           └─ upscripts
β”œβ”€ frontend
β”‚  β”œβ”€ documentation
β”‚  β”‚  β”œβ”€ Assets.md
β”‚  β”‚  β”œβ”€ build.md
β”‚  β”‚  β”œβ”€ eas-init.png
β”‚  β”‚  β”œβ”€ header-v1.png
β”‚  β”‚  β”œβ”€ HomeScreen
β”‚  β”‚  β”‚  β”œβ”€ collections-v1.png
β”‚  β”‚  β”‚  β”œβ”€ collectionsbottomdrawer-v1.png
β”‚  β”‚  β”‚  β”œβ”€ homescreen-v1.png
β”‚  β”‚  β”‚  β”œβ”€ HomeScreen.md
β”‚  β”‚  β”‚  β”œβ”€ questions-v1.png
β”‚  β”‚  β”‚  β”œβ”€ savequestiontocollectionbottomdrawer-v1.png
β”‚  β”‚  β”‚  └─ weeklystreak-v1.png
β”‚  β”‚  β”œβ”€ ProfileScreen
β”‚  β”‚  β”‚  └─ ProfileScreen.md
β”‚  β”‚  └─ styling.md
β”‚  └─ pseudo
β”‚     β”œβ”€ .env
β”‚     β”œβ”€ app
β”‚     β”‚  β”œβ”€ (tabs)
β”‚     β”‚  β”‚  β”œβ”€ algorithms.tsx
β”‚     β”‚  β”‚  β”œβ”€ flashcards.tsx
β”‚     β”‚  β”‚  β”œβ”€ home.tsx
β”‚     β”‚  β”‚  └─ _layout.tsx
β”‚     β”‚  β”œβ”€ collection.tsx
β”‚     β”‚  β”œβ”€ components
β”‚     β”‚  β”‚  β”œβ”€ home
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Collections.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ CollectionsBottomDrawer.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Questions.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ QuestionsByCategory.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ SaveQuestionToCollectionBottomDrawer.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ SortQuestionsBottomDrawer.tsx
β”‚     β”‚  β”‚  β”‚  └─ WeeklyStreak
β”‚     β”‚  β”‚  β”‚     β”œβ”€ DayColumn.tsx
β”‚     β”‚  β”‚  β”‚     └─ index.tsx
β”‚     β”‚  β”‚  β”œβ”€ shared
β”‚     β”‚  β”‚  β”‚  β”œβ”€ BottomSpacer.tsx
β”‚     β”‚  β”‚  β”‚  └─ Header.tsx
β”‚     β”‚  β”‚  └─ ui
β”‚     β”‚  β”‚     β”œβ”€ avatar.tsx
β”‚     β”‚  β”‚     β”œβ”€ badge.tsx
β”‚     β”‚  β”‚     β”œβ”€ button.tsx
β”‚     β”‚  β”‚     β”œβ”€ card.tsx
β”‚     β”‚  β”‚     β”œβ”€ dropdown-menu.tsx
β”‚     β”‚  β”‚     β”œβ”€ input.tsx
β”‚     β”‚  β”‚     β”œβ”€ radio-group.tsx
β”‚     β”‚  β”‚     β”œβ”€ select.tsx
β”‚     β”‚  β”‚     β”œβ”€ separator.tsx
β”‚     β”‚  β”‚     └─ text.tsx
β”‚     β”‚  β”œβ”€ contexts
β”‚     β”‚  β”‚  └─ AvatarContext.tsx
β”‚     β”‚  β”œβ”€ hooks
β”‚     β”‚  β”‚  β”œβ”€ useDrawer.ts
β”‚     β”‚  β”‚  └─ useHomeData.ts
β”‚     β”‚  β”œβ”€ index.tsx
β”‚     β”‚  β”œβ”€ lib
β”‚     β”‚  β”‚  β”œβ”€ icons
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ArrowLeft.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Bell.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ BellRing.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Bookmark.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Bug.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Check.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronDown.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronRight.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronsDown.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronsDownUp.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronsRight.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronsUpDown.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ ChevronUp.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Circle.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ CircleCheck.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Ellipsis.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ House.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ iconWithClassName.ts
β”‚     β”‚  β”‚  β”‚  β”œβ”€ IdCard.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Layers.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Palette.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Pencil.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Sparkles.tsx
β”‚     β”‚  β”‚  β”‚  β”œβ”€ SquareTerminal.tsx
β”‚     β”‚  β”‚  β”‚  └─ UserRoundPen.tsx
β”‚     β”‚  β”‚  β”œβ”€ useColorScheme.tsx
β”‚     β”‚  β”‚  └─ utils.ts
β”‚     β”‚  β”œβ”€ profile.tsx
β”‚     β”‚  β”œβ”€ questions.tsx
β”‚     β”‚  β”œβ”€ solve.tsx
β”‚     β”‚  β”œβ”€ testing.tsx
β”‚     β”‚  └─ _layout.tsx
β”‚     β”œβ”€ app.config.js
β”‚     β”œβ”€ assets
β”‚     β”‚  β”œβ”€ avatars
β”‚     β”‚  β”‚  β”œβ”€ 1.png
β”‚     β”‚  β”‚  β”œβ”€ 2.png
β”‚     β”‚  β”‚  β”œβ”€ 3.png
β”‚     β”‚  β”‚  β”œβ”€ 4.png
β”‚     β”‚  β”‚  β”œβ”€ 5.png
β”‚     β”‚  β”‚  β”œβ”€ 6.png
β”‚     β”‚  β”‚  β”œβ”€ 7.png
β”‚     β”‚  β”‚  β”œβ”€ 8.png
β”‚     β”‚  β”‚  └─ bosty-1.png
β”‚     β”‚  β”œβ”€ fonts
β”‚     β”‚  β”‚  β”œβ”€ Montserrat
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Montserrat-Italic-VariableFont_wght.ttf
β”‚     β”‚  β”‚  β”‚  β”œβ”€ Montserrat-VariableFont_wght.ttf
β”‚     β”‚  β”‚  β”‚  β”œβ”€ OFL.txt
β”‚     β”‚  β”‚  β”‚  β”œβ”€ README.txt
β”‚     β”‚  β”‚  β”‚  └─ static
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Black.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-BlackItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Bold.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-BoldItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-ExtraBold.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-ExtraBoldItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-ExtraLight.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-ExtraLightItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Italic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Light.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-LightItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Medium.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-MediumItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Regular.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-SemiBold.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-SemiBoldItalic.ttf
β”‚     β”‚  β”‚  β”‚     β”œβ”€ Montserrat-Thin.ttf
β”‚     β”‚  β”‚  β”‚     └─ Montserrat-ThinItalic.ttf
β”‚     β”‚  β”‚  └─ SpaceMono-Regular.ttf
β”‚     β”‚  └─ images
β”‚     β”‚     β”œβ”€ adaptive-icon.png
β”‚     β”‚     β”œβ”€ favicon.png
β”‚     β”‚     β”œβ”€ icon.png
β”‚     β”‚     β”œβ”€ partial-react-logo.png
β”‚     β”‚     β”œβ”€ react-logo.png
β”‚     β”‚     β”œβ”€ react-logo@2x.png
β”‚     β”‚     β”œβ”€ react-logo@3x.png
β”‚     β”‚     └─ splash-icon.png
β”‚     β”œβ”€ babel.config.js
β”‚     β”œβ”€ eas.json
β”‚     β”œβ”€ example.env
β”‚     β”œβ”€ expo-env.d.ts
β”‚     β”œβ”€ global.css
β”‚     β”œβ”€ metro.config.js
β”‚     β”œβ”€ nativewind-env.d.ts
β”‚     β”œβ”€ package-lock.json
β”‚     β”œβ”€ package.json
β”‚     β”œβ”€ README.md
β”‚     β”œβ”€ supabase.ts
β”‚     β”œβ”€ tailwind.config.js
β”‚     └─ tsconfig.json
β”œβ”€ instructions
β”‚  └─ instructions.md
β”œβ”€ notes
β”‚  β”œβ”€ lessons-learned.md
β”‚  β”œβ”€ pretty-json-template.json
β”‚  └─ README.md
└─ README.md

About

a mobile application where users can practice solving coding interview questions using pseudocode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors