Disclaimer : There was some last minute error and I could not make the seeds file working properly. (Couldn't insert posts and reco). So to test the application you will have to create data manually. I inserted the insomnia file so you can use it with postman or other request tools. Sorry about that.
For a faster integration, I used a boilerplate that included most of the tools that I was going to use in my nodejs web server application : https://github.com/antonio-lazaro/prisma-express-typescript-boilerplate/tree/main
- Authentification and authorization with passport
- Express JS
- Typescript
- Prisma
- Docker
- Dotenv for environement variables
The main model here is a Post
. We consider a post as question made by our user.
This Post
has :
- one-to-one relation with a
User
- one-to-many relation with a
Category
- one-to-one relation with a
Reco
A Reco
is a set of data containing the agronome answer to the Post
And finally a Category
is simply a table containing information about the different sections the post is related about
When you start the project with yarn start
it will :
- create a docker with the db
- Initialize and push prisma
- Create the seeds data (error here..)
- Start the web server on port 3000
- Test...
For the mobile side I decided to start with the Ignite boilerplate (one of React team recommendation). This boilerplate include multiple tools out of the box :
- State management with mobx state tree
- API request with Apisauce
- Testing with maestro and jest (I didn't have time to dig this aspect for this app)
- Navigation with react navigation
There is two main component:
- Login
- Home You can not enter the app if you are not logged. When you are logged you arrive on a TabContainer containing two sections :
- Your posts
- All the posts of all the users
Those two tabs have their own Stack Navigation
in order to select a post that we want to the detail of
- Make sure you started the backend server first before running the mobile
- Since I am using an old computer which had lot of trouble running simulator and working on local plateforme because of dependancy issues(ios and android), I did not want to waste time debbugin the environment so I decided to test only on the web side. That is why the
yarn start
is starting expo for the web.
- Tests
- Pagination on lists
- Edit a post that you created
- Add a new post (the button was added, but I did'nt have time to create the page)
- Connection with admin profile
- Multiple colors for categories on post
- Information about the post status (answered or pending) on the list
- Admin can make recommendation on questions