If it were me that got talked to like that I'd be furious.
It's totally unprofessional to tell someone they expected the project to be done earlier and criticize your code when it's in a completed state.
Especially if that someone DOESN'T EVEN WORK DIRECTLY WITH YOU #wtf.
You're a junior dev... It's the company's responsibility to provide the adequate processes and mentoring to enable you to grow, and to provide real-time feedback (pair programming / code reviews / presentations / whiteboarding etc).
Also, it's totally unprofessional not to have all the people present in the meeting that are responsible for the delivery of the project. If the manager wasn't there it should have been rescheduled.
In my weathered state as a developer, I'd probably have the balls to write all these points down, and to ask for a meeting with the boss. If they reacted with further gas lighting I'd immediately take my resignation out of my back pocket and hand it to them.
There are a few old consulting tricks to doing this effectively:
Phrase the points as follows:
* Start your point with what you observed or something that is non-subjective
* Avoid saying "you" in a sentence (this is to avoid confrontation and getting someone on the defensive).
* Also, use "we" to make it seem like "we're all in this together as a team" - even if it's just you you're talking about.
* Start how the action made you _feel_. People cannot disagree with your feelings.
* Hear the other person out
* State what you think would be the appropriate approach for next time.
e.g.
"In the meeting the other day, a point was made that the project wasn't completed in the time it was expected.
When this point was made, to be honest, it made me feel resentful, as I always put a great deal of care into my work. It also made me feel like I wasn't valued as a team member. I also felt dismissed and not heard out when I explained why things had been done the way that had been.
# wait for reaction
I was thinking about how to improve this situation in the future. First of all, if we find ourselves in this situation again could we make sure that everyone is in the meeting that needs to be?
Secondly, I appreciate receiving feedback, however I feel that to do it at the end of a project is much too late. If that's important to you, could we do this more regularly?
...
"
This way, if the boss ever tries to hit you up again at the end of a project, you can bring up the conversation that you had in the past. Apply the same methodology to your discussion and you'll end up on top and make them look like the ass they are.