Giter Site home page Giter Site logo

shikoba-api's Introduction

This is the Elixir and Phoenix backend API for the Shikoba Platform

Languages Stars Forks Contributors

Installation

Requirements

You will need to install the following:

Clone this repository

You'll want to clone this repository with git clone [email protected]:vejovove/shikoba-api.git. If you plan on contributing, you'll want to fork it too!

To start your Phoenix server:

  • Install dependencies with cd backend/ && mix deps.get and cd frontend/ && yarn install
  • Configure database credentials: cp backend/config/dev.secret.example.exs backend/config/dev.secret.exs
  • Create and migrate your database with cd backend/ && mix ecto.setup
  • Start Phoenix endpoint with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Contributing

All contributions are more than welcome! PRs without tests won't be accepted.

Please, follow the guidelines

shikoba-api's People

Contributors

laurabeatris avatar leoleitesc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

churcho

shikoba-api's Issues

Create locations

Description

Blocked by #1

Create locations table in locations context:

image

Notes

  • Add a nullable reference for users table.

Tasks

  • Create location migration.
  • Create location Ecto schema.
  • Add location as nested changeset in user schema (we can use cast_assoc
  • Create location context with Crudry default functions
  • Create GraphQL schema (just the schema)

Create NaturalPersons

Description

Blocked by #1

Create natural persons table in Accounts context:

image

Notes

  • Add unique constraint to cpf field. We can use the unique_index function
  • Possible values for gender -> male, female and non_binary. For enums, use EctoEnum
  • Add unique constraint to user_id.

Tasks

  • Create migration;
  • Create Ecto schema in Accounts context;
  • Create GraphQL schema (No mutations for now);
  • Create factory;
  • Create seeds;
  • Create tests;

Create users

Description

Add new fields to user schema.

Notes

User table:

image

  • Possible roles: user and admin
    The NULL in field means the field could be null

  • Save the phone number only with numbers

  • We will not implement file upload for now, so the field photo can be a string. We can use the library Faker as a workaround. (docs here)

Tasks

  • Add fields to user schema
  • Create seeds (one normal user and one admin are enough for now)

Create NGOs

Description

Create NGOs table and context.

image

Notes

  • Upload is not implemented yet. Use Faker as workaround in photo.
  • Save cnpj with only numbers.
  • Ignore location_id and social_network_id for now.

Tasks

  • Create migration.
  • Add NGO reference to locations table (a belongs_to association in location schema)
  • Create NGO Ecto schema in NGO context. Use Crudry here
  • Add location nested changeset in NGO changeset. Use cast_assoc like in #3
  • Create NGO GraphQL schema with all basic queries and mutations.
  • Create factory.
  • Create seeds.
  • Create tests.

Add NGO managers

Description

Blocked by #3

Create NGOs table and context.

image

Notes

  • Upload is not implemented yet. Use Faker as workaround in photo.
  • Save cnpj with only numbers.
  • Ignore location_id and social_network_id for now.

Tasks

  • Create migration.
  • Add NGO reference to locations table (a belongs_to association in location schema)
  • Create NGO Ecto schema in NGO context. Use Crudry here
  • Add location nested changeset in NGO changeset. Use cast_assoc like in #3
  • Create NGO GraphQL schema with all basic queries and mutations.
  • Create factory.
  • Create seeds.
  • Create tests.

Improve README

  • Change picture to be responsive on dark mode? Maybe using the prefers-color-scheme: dark in picture tag (see example here.
  • Remove folder /backend from setup guidelines.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.