GithubHelp home page GithubHelp logo

aidanjbailey / anidopt Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.34 MB

Classifieds web-app for animal adoption (WIP)

License: GNU Affero General Public License v3.0

C# 59.92% HTML 39.15% CSS 0.42% JavaScript 0.27% Dockerfile 0.23%

anidopt's Introduction

Anidopt

Classifieds web-app for animal adoption (WIP)

Requirements

Usage

Make sure dotnet-ef is installed

dotnet tool install --global dotnet-ef

Create a json file called appsettings.json in the Anidopt directory containing an AnidoptContext connection string, e.g.

{
  "ConnectionStrings": {
    "AnidoptContext": "Server=(localdb)\\MSSQLLocalDB;Database=_CHANGE_ME;Trusted_Connection=True;MultipleActiveResultSets=true"
  }
}

A database will be built with the connection string if it does not exist.

Use the typical dotnet cli commands for the rest...

Build

dotnet build

Clean

dotnet clean

Run

dotnet watch

...blah blah blah...

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Copyright (C) 2023 Aidan Bailey

anidopt's People

Contributors

aidan-bailey avatar

Stargazers

Calvin Gibbs avatar

Watchers

 avatar

anidopt's Issues

Rework entity controllers and views

I like the idea of the Site Admin having unfettered access over the database tables.

Right now I set up the Entity controllers expecting average users to use them, now I am not so sure.
I think the current Entity controllers should be used strictly by Site Admins.
The views and controllers should be reworked so they can directly edit the database as is without any abstractions (so no fancy link-proxy nonsense).

Store pictures for animals in database

Description

Animals need pictures!

Notes

  • Pictures will be stored in the database.
  • Size of pictures will currently just be 2GB as that is the maximum size of a VARBINARY field.
  • Each animal can have zero to many pictures with zero to one main picture selected (to be displayed on the grid card).
  • The picture table will have the schema: (Id: int, Bytes: ByteArray, AnimalId: int, Main: bool).

TODO

  • Create picture table.
  • Create picture service.
  • Create picture controller/views.
  • Add to Animal controller/view.

Controller service integration

Services need to be integrated into their respective controllers.

Integrations:

  • AnimalsController
  • BreedsController
  • DescriptorLinksController
  • DescriptorsController
  • DescriptorTypesController
  • EstimationsController
  • OrganisationsController
  • SexesController
  • SpeciesController

Colours

Animals have colours.

An animal can have one to many colours.

Implement services

Basic services for tables need to be implemented.
Each service must have an interface and an implementation.
Services must be registered in the dependency injection registry.

Basic methods:

  • bool Initialised { get; }
  • Task<List<[Type]>> Get[Type]sAsync();
  • Task<[Type]?> Get[Type]ByIdAsync(int id);
  • Task<bool> [Type]ExistsByIdAsync(int id);
  • Task Ensure[Type]DeletionByIdAsync(int id);

Services:

  • AnimalService
  • BreedService
  • DescriptorService
  • DescriptorLinkService
  • DescriptorTypeService
  • EstimationService
  • OrganisationService
  • SexService
  • SpeciesService

Logins [WIP]

Description

Users need to be able to login and view different things based on them.

Notes

  • There are two types of users: Admin and Organisation
  • Admins should be able to see and edit all the database tables.
  • Organisations should be able to see and edit their animals.

TODO

Organisation Admin views

An Organisation Admin should be able to do several things:

  • View own profile
  • Edit own profile
  • View Organisation Users
  • Create Organisation Users
  • Edit Organisation Users
  • Remove Organisation Users
  • View Classifieds
  • Create Classifieds
  • Edit Classifieds
  • Remove Classifieds

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.