Learn react, copied a C station Civitai

After more than two months, Bitter Gan finally copied a station C, which is now the most popular AI painting community Civitai.
Let's take a look at the renderings!
insert image description here
insert image description here

Technology stack introduction

I'm still a novice, so I don't use various technologies like station C.
At present, just to show the data, my Civitai simple technology stack is as follows

前端:React
后端:Flask
数据库,emmm没有用数据库

In terms of react technology, various hooks are used more, such as useEffect, useState, useContext, etc. Because the foundation is not solid enough, you forget it after you learn it. You often forget the usage of hooks while writing, or simply forget the name of the hook. Then there is the strict type restriction of typescript, if the type is not written, or if it is written inappropriately, there will be a red error message, so annoying emmm.
In the future, I plan to learn next, just like station c, using next technology.

background introduction

As a programming enthusiast, I like to write code or learn programming technology when I have nothing to do. It is just at the time of learning the front-end framework of react. I want to find a project to practice and consolidate the knowledge of react. At the same time, I have played with AI painting of stable diffusion and know Civitai On this website, I found that it happened to be an open source project of react, and finally chose station c as the learning target, while looking at other people's source code, while consolidating react, so I suffered for two months, copying other people's code while learning, and further reformed, To make the code run, because I am a novice, their code is too good and huge. It took more than two months, and I also got two incomplete interfaces. I plan to continue to learn and update the website in the future.

Introduction to Civitai

It is generally called Station C. People who have played AI painting or Stable Diffusion must be familiar with Civitai.com, because it is a website often visited by AI painters, whether they are looking for prompts, lora models, checkpoint models, various For any kind of inspiration, the Civitai website is the best place to go. And the download speed is also very fast. I really don't know how much bandwidth he has to support the huge traffic of AI painting enthusiasts around the world. Due to the variety of model pictures above, it involves various 13+, 16+, 18+ pictures, as well as legal issues of star portraits. emmm, it is no longer accessible in China. At that time, I happened to be in the stage of ai painting mania. I saw someone upload a model of the boss in red clothes! ! ! Maybe this is why Civitai was banned, and within a few days, it was impossible to visit in China.

My Civitai Introduction

That's right, it's my Civitai!

Why do you say that? Because I bought the domain name civitai.cn, and the domain name of station C is civitai.com.
The difference between com and cn is that one is a mainstream generic domain name in the world, while cn is unique to China, emmm, with a difference of two letters.

so first, it should be possible to sayCopy the domain name of station CNot too much!

Since station C has disclosed several data api interfaces to the outside world, everyone can obtain the data of models and pictures through the api (I admire station C so much, it is so grand)

so next, call the api interface provided by station c, you cansave datato my computer

finally, the data is available, of course, the data can beexhibitIt's time to go to the website!

Related Links

  1. Civitai main station, need scientific Internet access ----https://civitai.com
  2. My civitai ----https://civitai.cn
  3. civitai open source repository ---- https://github.com/civitai/civitai
  4. civitai rest api ---- https://github.com/civitai/civitai/wiki/REST-API-Reference

at last

Learning never stops!
Due to the low performance of the server, the access is a bit slow..., please forgive me.

Thank you for taking the time out of your busy schedule to see me lorry.

Buddha bless you~ everything goes smoothly and there are no bugs.

Guess you like

Origin blog.csdn.net/qwe1314225/article/details/131610001