Welcome to the Andromeda ASP.NET Core API! This project serves as the backend for Andromeda, a social media platform. It provides a set of RESTful endpoints to manage users, friendships, posts, likes, comments, tags, notifications, products, product likes, product comments, product tags, chats, and messages. The API uses JWT for authentication and Neo4j and Redis as the databases.
To get a local copy up and running, follow these simple steps.
- Clone the repository:
git clone https://github.com/7irelo/andromeda-asp-api.git
- Navigate to the project directory:
cd andromeda-asp-api
- Install dependencies:
dotnet restore
- Set up your Neo4j and Redis databases and update the connection strings in
appsettings.json
:{ "ConnectionStrings": { "Neo4jConnection": "bolt://localhost:7687", "RedisConnection": "localhost:6379" } }
- Apply migrations and update the Neo4j database:
dotnet ef database update
- Run the application:
dotnet run
After running the application, the API will be available at http://localhost:5000/api
.
You can use tools like Postman or curl to test the endpoints.
To register a new user:
curl -X POST http://localhost:5000/api/users -H "Content-Type: application/json" -d '{
"username": "testuser",
"email": "[email protected]",
"password": "P@ssw0rd"
}'
GET /api/users
: Get all usersGET /api/users/{id}
: Get user by IDPOST /api/users
: Create a new userPUT /api/users/{id}
: Update an existing userDELETE /api/users/{id}
: Delete a user
POST /api/auth/login
: Login and get a JWT token
GET /api/friendships
: Get all friendshipsGET /api/friendships/{id}
: Get friendship by IDPOST /api/friendships
: Create a new friendshipPUT /api/friendships/{id}
: Update an existing friendshipDELETE /api/friendships/{id}
: Delete a friendship
GET /api/posts
: Get all postsGET /api/posts/{id}
: Get post by IDPOST /api/posts
: Create a new postPUT /api/posts/{id}
: Update an existing postDELETE /api/posts/{id}
: Delete a post
GET /api/likes
: Get all likesGET /api/likes/{id}
: Get like by IDPOST /api/likes
: Create a new likePUT /api/likes/{id}
: Update an existing likeDELETE /api/likes/{id}
: Delete a like
GET /api/comments
: Get all commentsGET /api/comments/{id}
: Get comment by IDPOST /api/comments
: Create a new commentPUT /api/comments/{id}
: Update an existing commentDELETE /api/comments/{id}
: Delete a comment
GET /api/tags
: Get all tagsGET /api/tags/{name}
: Get tag by namePOST /api/tags
: Create a new tagPUT /api/tags/{name}
: Update an existing tagDELETE /api/tags/{name}
: Delete a tag
GET /api/notifications
: Get all notificationsGET /api/notifications/{id}
: Get notification by IDPOST /api/notifications
: Create a new notificationPUT /api/notifications/{id}
: Update an existing notificationDELETE /api/notifications/{id}
: Delete a notification
GET /api/products
: Get all productsGET /api/products/{id}
: Get product by IDPOST /api/products
: Create a new productPUT /api/products/{id}
: Update an existing productDELETE /api/products/{id}
: Delete a product
GET /api/productLikes
: Get all product likesGET /api/productLikes/{id}
: Get product like by IDPOST /api/productLikes
: Create a new product likePUT /api/productLikes/{id}
: Update an existing product likeDELETE /api/productLikes/{id}
: Delete a product like
GET /api/productComments
: Get all product commentsGET /api/productComments/{id}
: Get product comment by IDPOST /api/productComments
: Create a new product commentPUT /api/productComments/{id}
: Update an existing product commentDELETE /api/productComments/{id}
: Delete a product comment
GET /api/productTags
: Get all product tagsGET /api/productTags/{id}
: Get product tag by IDPOST /api/productTags
: Create a new product tagPUT /api/productTags/{id}
: Update an existing product tagDELETE /api/productTags/{id}
: Delete a product tag
GET /api/chats
: Get all chatsGET /api/chats/{id}
: Get chat by IDPOST /api/chats
: Create a new chatPUT /api/chats/{id}
: Update an existing chatDELETE /api/chats/{id}
: Delete a chat
GET /api/messages
: Get all messagesGET /api/messages/{id}
: Get message by IDPOST /api/messages
: Create a new messagePUT /api/messages/{id}
: Update an existing messageDELETE /api/messages/{id}
: Delete a message
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Thank you for using Andromeda ASP.NET Core API! If you have any questions or suggestions, please feel free to open an issue or contact the project maintainers. Happy coding!