Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaquedasilva/cupcakecornerapi
A RESTful API that powers the features in the Cupcake Corner App.
https://github.com/isaquedasilva/cupcakecornerapi
cupcakecorner restful-api swift vapor
Last synced: 9 days ago
JSON representation
A RESTful API that powers the features in the Cupcake Corner App.
- Host: GitHub
- URL: https://github.com/isaquedasilva/cupcakecornerapi
- Owner: isaqueDaSilva
- License: mit
- Created: 2024-07-31T09:26:24.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T07:54:10.000Z (3 months ago)
- Last Synced: 2024-08-17T08:24:43.085Z (3 months ago)
- Topics: cupcakecorner, restful-api, swift, vapor
- Language: Swift
- Homepage:
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Table of Contents
1. [Overview](#overview)
2. [Features](#features)
3. [Getting started](#getting-started)
4. [Usage](#usage)
5. [Requirements](#requirements)
6. [Workflow](#workflow)# Cupcake Corner API
The system that powered all external features in the Cupcake Corner app.
# Overview
This RESTful API powers all external resources like communicating with the Postgres database for make some CRUD oparation, comunicate with administrator informing him when a new order is requested by Web Socket and even makes the User Authentication/Authorization with JWT tokens.
This API, also building using Swift with Vapor framework.# Features
* Comunication with Postgres Database for makes some CRUD operation;
* Authentication and Authorization with JWT;
* WebSocket for makes bidirectional communication between client side and server side for real time information;# Getting started
1. Make sure you have the Xcode version 15.4 or above installed on your computer.
2. Downloads the Cupcake Corner project file from this repositorys.
3. Make sure that you have some Postgres database service for utilize in this project. If no you can get some free service, like [Neon](https://neon.tech), as that I'm using now.
4. Open the project files in Xcode.
5. Select the current schema and them Edit Schema>Run.
6. Add two arguments in Arguments Passed on Launch:
```
1° -> migrate
2° -> migrate --revert
```
7. Add more six enviroments variables in the same location:
```
JWT_SECRET = {Your JWT secret}
CUPCAKE_CORNER_JWTSUB = {Your subject claim for JWT}
ADMIN_NAME = {Some name for default admin}
ADMIN_EMAIL = {Some email for default admin}
ADMIN_PASSWORD = {Some password for default admin}
DATABASE_KEY = {Your API key}
```
8. Review the code and make sure you understand what it does.
9. Run the server with the `migrate` flag active.
10. After the migration will be finish with success, disable the previous flag
11. Finally, runs the server.# Usage
- Run this server, and them runs the client and admin versions Cupcake Corner app, and test the routes there.;# Requirements
- Xcode 15.4+# Workflow
* Reporting bugs:
If you come across any issues while using the Cupcake Corner, please report them by creating a new issue on the GitHub repository.* Reporting bugs form:
```
App version: 1.0
macOS version: 14.6.1
Xcode version: 15.4
Description: When I'm access the BagView in the CupcakeCorner app in both admin and client versions, the server crashes.
```* Submitting pull requests:
If you have a bug fix or a new feature you'd like to add, please submit a pull request. Before submitting a pull request,
please make sure that your changes are well-tested and that your code adheres to the Swift style guide.* Improving documentation:
If you notice any errors or areas of improvement in the documentation, feel free to submit a pull request with your changes.* Providing feedback:
If you have any feedback or suggestions for the Cupcake Corner project, please let us know by creating a new issue.