A website for my school where the musicians can contact each others, create groups and register to play at events
MIT License
The project is still under development, only the backend exists for the moment
Find A Musician is a web platform that will allow musicians from IMT schools to meet, create bands and participate in events all in a few clicks.
The idea came when I realized that apart from whatsApp conversations or facebook groups, it was super hard to meet musicians or to keep up with different events. Find A Musician is a solution that allows to centralize all these problems on a single web platform making the musical association life much easier.
The platform allows all musicians to :
To run the application in development mode, you must run the frontend and the backend separately.
First of all, make sure you have the following dependencies install on your computer :
Follow these instructions to run the project in development mode
Clone the repo
SSH
git clone [email protected]:RomainGuarinoni/findAMusician.git
HTTPS
git clone https://github.com/RomainGuarinoni/findAMusician.git
Install NPM packages
npm install
Run the docker container
docker-compose up
You need to build the container the first time you run the backend :
docker-compose up --build
Set up the .env
files
The procedure to receive the .env is not yet implemented, please contact me for the moment
Run the test
npm run test
Place yourself in the frontend folder
cd frontend
Install the dependencies
npm install
Run the local developement mode
npm run dev
You can check the doc to have templates for routes and schemas
Every endPoint has its own API definition based on the OpenAPI sandart.
First, create a file in the folder /api/docs/schemas
and create your schema
like this :
///api/docs/schemas/example.ts
import { HandlerDefinition } from 'api/types/typing';
const schema: HandlerDefinition = {
path: '/example', // the path of your endPoint relative to the Base URL of the application
get: {
operationId: 'exampleSchema', // a name which represent this operation
//...a basic OpenAPI schema
},
};
export default schema;
When the schema is done, it will be auto inserted in the swagger definition and the types corresponding to the schema will be auto generated too.
Create a file in the folder /api/routes
and create your route like this :
///api/routes/example.ts
import express, { Request } from 'express';
import core from 'express-serve-static-core';
import type { operations } from '@schema';
//these methods extract the content of an OpenAPI operations type.
import { getHTTPCode, getResponsesBody } from '@typing';
const router = express.Router();
// the key of the operations object is the operationId you gave in the OpenAPI definition
type exampleOperation = operations['exampleSchema'];
const router = express.Router();
router.get(
'/',
async (
req: Request,
res: core.Response<
getResponsesBody<exampleOperation>,
{},
getHTTPCode<exampleOperation>
>,
) => {
// ...your code
},
);
export default router;
Finnaly, you need to import your new router in the server/server.ts
file like
this :
//server/server.ts
import testRouter from '../routes/example';
app.use('/example', testRouter);
api/command/pg_reset.sh
npm run lint
npm run uuid
npm run password
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feat/AmazingFeature
)git commit -m 'feat(type): subject'
)git push origin feat/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Romain Guarinoni - linkedin - [email protected]
Project Link: https://github.com/RomainGuarinoni/findAMusician
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!