![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/casxt/timeline
TimeLine是一个生活日记类软件。希望能成为Between类应用的一个替代品,可以用于记录生活中的每一个美好时刻。并将这些回忆串为一条时间线。
每一条Line可以加入多个用户,用户可以为Line添加Slice,Slice是记录的基本单位。每个Slice可以附带一些图片等媒体。
每一个用户也可拥有多条Line,例如和父母之间的回忆有一条Line,和女友/男友之间用另一条Line。
TimeLine也是一个开源学习项目,使用Go语言完成后端搭建。拥有自己的网络组件,所有http组件均基于官方库开发,没有引入第三方库。目前前端使用Boostrap,希望有人能在后台的基础上进行二次开发。
目前情侣应用的数据安全是一个大问题,Between在前段时间出现了跑路传闻,让我对之前上传的数据十分担心,出于这个直接原因,我完成了这个网站。
希望通过定期备份并发给的方式解决数据安全问题,但是在主题功能完成之前暂时还不会去做这个功能
通过文字,图片,甚至是视频记录每一个幸福的时刻,并分享给你的亲人。这是增进感情的一个好方式。
记录纪念日,并设定提醒周期
可爱的昵称是必要的
apt install gcc-go git
git clone https://github.com/Casxt/TimeLine.git
cd TimeLine
go bulid
将 config.template.json 重命名为 config.json 并打开
将SQL的内容设置为你的数据库配置
Cert中配置证书,如果留空则不启用ssl
填写ProjectPath为网站文件目录,例如你在/root/下执行 git clone
,则 Path为 "/root/TimeLine"
在目录下执行 ./TimeLine
所有的API均为json格式,Method为Post,图片除外
调用地址类似为 example.com/api/[apiName]
如SignUp调用地址为 example.com/api/SignUp
注册接口,Phone为用户手机,Mail为用户邮箱, HashPass 为 用户密码Hash256后的结果,
{
Phone string //用户手机
Mail string //用户邮箱
HashPass string //用户密码Hash256的结果
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
登陆的第一个步骤,检查手机或邮箱是否存在,并返回salt供后续步骤使用
{
Account string //用户账户,可以是手机或者是邮箱
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
NickName string //昵称
Salt string //后续步骤需要使用
SignInVerify string //后续步骤需要使用
}
登陆接口,需要先使用CheckAccount
API获得Salt
和SignInVerify
后才可以使用
{
Encrypted string //加密后的字符串,16进制字符串
IV string //加密时用到的IV,16进制字符串(12字节原始数据HEX后得到的24字节字符串)
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
SessionID string //登陆成功的SessionID
Phone string //用户手机
NickName string //用户昵称
}
创建一条新Line
{
Operator string //当前登陆用户的手机
LineName string //Line的名字
SessionID string //与当前登陆用户对应的SessionID
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
新增一个Slice
{
SessionID string //SessionID
Operator string //用户手机
LineName string //要添加到的Line名字
Content string //Slice的文字内容
Gallery []string //Slice的附带图片
Type string //种类,回忆还是纪念日
Visibility string //查看权限,自己可见,同Line可见,公开
Longitude string //精度
Latitude string //纬度
Time string //记录时间
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
获取某个Line的全部Slice
{
SessionID string
Operator string
LineName string //Line名
PageNum int //页数,每页20条
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
Slices []database.SliceInfo //Slice信息数组
}
/*database.SliceInfo:*/
{
UserName string //创建者昵称
Gallery []string //附带图片
Content string //附带文字
Type string //类型
Visibility string //查看权限
Location string //定位
Time time.Time //记录时间
}
获取指定用户所属的全部Line
{
SessionID string
Operator string
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
Lines []string //全部Line名称
}
添加用户到指定Line
{
Operator string //当前登录用户
SessionID string //当前登录用户的SessionID
LineName string //Line名
NickName string //被添加的用户昵称
UserPhone string //被添加用户手机
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
设置用户头像
{
SessionID string
Operator string
Picture string //图像编码
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
获取用户账户信息
{
SessionID string
Operator string
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
NickName string //昵称
Phone string //手机
Mail string //邮箱
Gender string //性别
ProfilePic string //头像
SignInTime time.Time //注册时间
}
更改昵称
{
SessionID string
Operator string
NewName string //新昵称
}
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
}
文件API使用multipart/form-data
POST格式,URL为/image
POST的Cookie中应包含Operator字段和SessionID字段
所有图片的字段名称为images
单张图片不小于512字节,一次发送的图片总大小最大为20MB,一次最多传输9张
返回格式为json字符串
{
State string //"Success" 成功 "Failed"失败
Msg string //成功或失败的相关信息
Detail string //更详细的信息,不一定存在此字段
//以下字段只在State为"Success"时存在
Hashs []string //图片ID数组
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.