Tweeter-API - This API is a backend of the a social network (Tweeter) with authentication flux, interact with tweets, user and comment. This was make with TypeScript how language programming, PostgreSQL how database, typeORM how ORM and Jest to unitary/integration tests.
Feature | Coded? | Description |
---|---|---|
SignIn. | β | Ability to signIn in application. |
Create User. | β | Ability to create a account. |
Show all users. | β | Ability to show all users. |
Show user by id. | β | Ability to show a user by id. |
Show followings. | β | Ability to show all followings from a user. |
Show followers. | β | Ability to show all followers from a user. |
Show bookmarks. | β | Ability to show bookmarks from a user. |
Show who follow. | β | Ability to recommend users to follow. |
Edit informations and image about user. | β | Ability to edit informations and images about user. |
Following a user. | β | Ability to follow a user. |
Unfollow a user. | β | Ability to unfollow a user. |
Create a tweet with image. (optional) | β | Ability to create a image with or no image. |
Show all tweets. | β | Ability to show all tweets. |
Show tweets by user. | β | Ability to show tweets by user. |
Show tweets private only if follow this user. | β | Ability to show tweets private only if follow this user. |
Show trends for you. | β | Ability to show main trends. |
Save tweet how bookmark. | β | Ability to save a tweet how bookmark. |
Remove tweet from bookmark. | β | Ability to remove a tweet from bookmark. |
Like a tweet. | β | Ability to like a tweet. |
Remove like from tweet. | β | Ability to remove a like from tweet. |
Delete tweet. | β | Ability to delete tweet. |
Create a comment for a tweet with image. (optional) | β | Ability to create a comment for a tweet with or no image. |
Like a comment. | β | Ability to like a comment. |
Remove like from comment. | β | Ability to remove like from comment. |
Delete comment. | β | Ability to delete a comment. |
You must have the tools installed: Git, Node.js. And create a new file called: .env, that follow .env.example credentials example.
You also have to create a database with PostgreSQL in your machine and put URI in .env or only use the docker to run database with command docker-compose up
in this directory in terminal (for it you must have docker and docker-compose installed) and put your database uri in the file .env Besides another credentials required informed in file.
DATABASE_URI to docker-compose: postgresql://postgres:admin@localhost:8080/tweeter
# In the terminal, clone the project: $ git clone https://github.com/Wesley-wsl/Tweeter-backend.git # Enter the project folder: $ cd Tweeter-backend # Install dependencies: $ yarn or $ npm install # Run migrations $ yarn typeorm migration:run -d src/api/database/index.ts # Run the application: $ yarn dev or $ npm run dev
Okay, now you can access the application from the route: https://localhost:3333/api/v1/docs
This application was highly tested with unitary/integration tests using jest to get 100% coveraged. To run the tests you need only execute yarn test:coverage
in the terminal in this directory.