Programming Summary - Some General Toughts On Coding
Programming Summary - Some General Toughts On Coding
Project structure
core pages
layout
Splash screen
we dont autotmatically hide the splash screen, we hide it our selfvs
Project structure 1
Use efffect
Return
UI - components
ui structure
Project structure 2
all custom components should be:
reusables
customaizable
in shdacn approach
deleted components
rtl view
Project structure 3
<View
// @ts-ignore: className is for NativeWind
className={className}
{...props}
>
{children}
</View>
);
}
rtl text
LTR view
Project structure 4
import React from "react";
import { View, ViewProps } from "react-native";
LTR text
Project structure 5
);
}
features
chat feature
General structure
folder structure theory
Project structure 6
Project structure 7
chat gpt response
Project structure 8
Project structure 9
biz logic
so the idea - what does your business need- like the workflows
Project structure 10
Project structure 11
actual folder structure
Project structure 12
Project structure 13
Project structure 14
models
Domain modules
the idea of domain modules, is to combine between the different services
- they are the controllers, basiclly
Project structure 15
Project structure 16
the idea - the exact shape of a data as it corsses boundraies -
A repository:
Project structure 17
Project structure 18
Project structure 19
another propsoesd structure
Project structure 20
Project structure 21
explnation
Project structure 22
Project structure 23
app folder organizaiton
Project structure 24
Data flow
unit_ lessons → lesson
Project structure 25
Code
backend
services
openai
chat-service.js
What it does:
How it works
1. first, append the user message to the newHistory varaible.
5. than take the args, and because we have only one function
schema, i know it will use the completeTask, so i just call it ,
and get a return value from it. (i know its a string).
7. i call then onceagain, to it, with the new history, to openai api.
Project structure 26