uponthesky / techlog-article Goto Github PK
View Code? Open in Web Editor NEWMy blog for personal technical articles
My blog for personal technical articles
For providing static data such as .txt
or .md
, we need to read them and send them right away to the user of request.
Consult the following references:
Mid-term check: read through the following tutorials and check whether we're missing anything
user sign up
user sign out
user.deleted_at
and auth.deleted_at
as datetime.now(timezone.utc)
user account update
We have the following error when we run all the tests for confirmation:
โ 19 await prismaClient.article.createMany(
Unique constraint failed on the constraint: `PRIMARY`
A solution might be this: https://stackoverflow.com/a/67935087
Implement the backend api for the login page, solely dedicated to the owner user(the author)
We should fetch a given user's data from the database and authenticate a user.
We will follow the security guide provided by FastAPI docs.
Roadmap: Read and implement the FastAPI docs basic tutorial part, before Error handling.
Article
User
username
and password
to the serverdeactivate the token
implement public interface of 1
implement public interface of 2
implement public interface of 3
revisit: after DB adapter
revisit: after common utils
(optional) implement a cache server for the user tokens(Redis) => currently, we only focus on the overall implementation of the application.
Implement the backend api for the main page
remark: do DB settings simultaneously
On branch develop
, finish the basic development environment setup.
In detail:
yarn --init
tsc --init
package.json
and tsconfig.json
typescript
, ts-node-dev
(instead of nodemon)eslint
(with pre-commit hook)ts-jest
(with pre-commit hook)prettier
(with pre-commit hook)Need to consult:
Basic CRUD jobs
create
str
), content(Optional[str]
), and user(author) id(dependency injected)relationship
)read
read all
update
delete
Testing with FE locally => testing on AWS
Originally intending to work with GCP. However due to the time limit, we'll deploy it to vercel
Separate the logic, such that this service only handles CRUD APIs for the admin user only.
Furthermore, this service will be migrated into FastAPI.
This is kind of intermediate check - so that we don't have to deal with more complex collisions in the future.
Need to spend some time to write about this issue in general
Including:
MeResponse
Url
typeonly domain logics are our targets of unit testing
article
user
auth
@transactional
& testingDo the web controller testing with some mocks
references
user
auth : not necessary
article
References:
install redis locally
install redis client
Implement the backend api for the individual article pages
Use testcontainers
relying on this tutorial: https://mariogarcia.github.io/blog/2019/10/pytest_fixtures.html
user
auth
article
Dockerfile
requirements.txt
Related to #29
Currently the backend service has very limited performance & devops features.
We will move to GCP for better features.
TBA:
make some senarios and do e2e testings
Currently, we would like to do manually. But in the future we want to convert them into code.
user signs up
user logs in
user reads an article
user reads a list of articles
user creates an article
user updates an article
user deletes an article
user logs out
user signs out
Check:
naming & responsibilities
duplicates in code
article
user
auth
Implement the backend api for the self introduction(about me) page
This page consists mainly of static data, so not much works to be done: the root directory is public/me
/profile
/shortIntro
/education
/workExperience
/compSci
/hobbies
choose one of the followings and deploy:
Questions: does this service...
Edit(May 18th, 2023)
We're going to choose the following path:
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.